-
Notifications
You must be signed in to change notification settings - Fork 210
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
fix(wren-ai-service): disable pass embedding model dim to embedders #579
Conversation
7d44d89
to
08ddb34
Compare
@@ -25,6 +25,7 @@ COPY --from=builder ${VIRTUAL_ENV} ${VIRTUAL_ENV} | |||
|
|||
COPY src src | |||
COPY entrypoint.sh /app/entrypoint.sh | |||
COPY pyproject.toml pyproject.toml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems been copied in L13, why did we copy it again?
@@ -25,6 +25,7 @@ aiohttp = {extras = ["speedups"], version = "==3.9.5"} | |||
ollama-haystack = "==0.0.6" | |||
langfuse = "==2.35.0" | |||
ollama = "==0.2.1" | |||
toml = "==0.10.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you think that we move the tomlkit from eval group to main?
@@ -220,7 +220,6 @@ def get_text_embedder(self): | |||
return AsyncTextEmbedder( | |||
api_key=self._embedding_api_key, | |||
model=self._embedding_model, | |||
dimensions=self._embedding_model_dim, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What’s the reason for removing the parameter? Also, what do you think about removing the attribute from the object initializer and related code? It seems like it might clutter the Langfuse trace with unnecessary information.
embedding_model_dim: int = ( | ||
int(os.getenv("EMBEDDING_MODEL_DIMENSION")) | ||
if os.getenv("EMBEDDING_MODEL_DIMENSION") | ||
else 0 | ||
) | ||
or EMBEDDING_MODEL_DIMENSION, | ||
): | ||
self._url = remove_trailing_slash(url) | ||
self._embedding_model = embedding_model | ||
self._embedding_model_dim = embedding_model_dim |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn’t seem to be used anywhere. I think we can remove it.
dimensions=self._embedding_model_dim, | ||
) | ||
|
||
def get_document_embedder(self): | ||
return AsyncDocumentEmbedder( | ||
api_key=self._api_key, | ||
api_base_url=self._api_base, | ||
model=self._embedding_model, | ||
dimensions=self._embedding_model_dim, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as the comment as Azure OpenAI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have discussed offline. LGTM. thanks for the work!
No description provided.