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: separate model and deployment for OpenAIEmbeddings #3076

Conversation

tunayokumus
Copy link
Contributor

Separated the deployment from model to support Azure OpenAI Embeddings properly.
Also removed the deprecated document_model_name and query_model_name attributes.

Remove deprecated  document_model_name and query_model_name
@tunayokumus tunayokumus changed the title fix: separate model and deployment. fix: separate model and deployment for OpenAIEmbeddings Apr 18, 2023
# TODO: deprecate these two in favor of model
# https://community.openai.com/t/api-update-engines-models/18597
# https://github.com/openai/openai-python/issues/132
document_model_name: str = "text-embedding-ada-002"
Copy link
Contributor

Choose a reason for hiding this comment

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

@hwchase17 technically breaking change, how do we feel about it

Copy link
Contributor

Choose a reason for hiding this comment

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

i think fine

Copy link
Contributor

@hwchase17 hwchase17 left a comment

Choose a reason for hiding this comment

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

thanks!

@hwchase17 hwchase17 merged commit 6e48107 into langchain-ai:master Apr 19, 2023
@tunayokumus
Copy link
Contributor Author

fixes #1560 #1577 #2854

@chip-davis
Copy link
Contributor

Thanks for the update! This still results in
openai.error.InvalidRequestError: Too many inputs. The max number of inputs is 1. We hope to increase the number of inputs per request soon. Please contact us through an Azure support request at: https://go.microsoft.com/fwlink/?linkid=2213926 for further questions.
as mentioned in #1560

I am assuming there is nothing we can do about that and it is on Azures end ( besides chunk_size=1? ).

samching pushed a commit to samching/langchain that referenced this pull request May 1, 2023
…#3076)

Separated the deployment from model to support Azure OpenAI Embeddings
properly.
Also removed the deprecated document_model_name and query_model_name
attributes.
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.

4 participants