Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for open source models based on text-embeddings-inference #66

Merged
Prev Previous commit
Next Next commit
✨ Add support for open source models based on text-embeddings-inferen…
…ce. Signed-off-by: wileyzhang <bluechanel612@gmail.com>
  • Loading branch information
wiley committed Jan 23, 2025
commit 7530119bf3087c5087217000c41f75a9c9a61452
2 changes: 1 addition & 1 deletion src/pymilvus/model/dense/opensource.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def __init__(
api_url: str,
dimensions: Optional[int] = None,
):
self.api_url = api_url
self.api_url = api_url + "/v1/embeddings"
self._session = requests.Session()
self._dim = dimensions

Expand Down
2 changes: 1 addition & 1 deletion src/pymilvus/model/reranker/opensource.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class OpenSourceFunction(BaseRerankFunction):
def __init__(self, api_url: str):
self.api_url = api_url
self.api_url = api_url + "/rerank"
self._session = requests.Session()

def __call__(self, query: str, documents: List[str], top_k: int = 5) -> List[RerankResult]:
Expand Down