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

Fix OpenAIEmbeddingFunction in JS to use passed model name #381

Merged
merged 1 commit into from
Apr 22, 2023

Conversation

naynaly10
Copy link
Contributor

Class OpenAIEmbeddingFunction() is initiated with an optional parameter - model (string). But inside the generate() function of the class, the optional parameter is forgotten to be used when making API Call to OpenAI. Instead of the parameter, a string literal "text-embedding-ada-002" is used.

Description of changes

Summarize the changes made by this PR.

  • Improvements & Bug fixes
    • ...
  • New functionality
    • ...

Test plan

How are these changes tested?

Documentation Changes

Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs repository?

Class OpenAIEmbeddingFunction() is initiated with an optional parameter - model (string). But inside the generate() function of the class, the optional parameter is forgotten to be used when making API Call to OpenAI. Instead of the parameter, a string literal "text-embedding-ada-002" is used.
Copy link
Contributor

@jeffchuber jeffchuber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great catch!

@jeffchuber jeffchuber changed the title Update index.ts Fix OpenAIEmbeddingFunction in JS to use passed model name Apr 21, 2023
@jeffchuber jeffchuber merged commit b96fc38 into chroma-core:main Apr 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants