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

embeddings model #1

Open
fabianocastello opened this issue Sep 10, 2023 · 2 comments
Open

embeddings model #1

fabianocastello opened this issue Sep 10, 2023 · 2 comments

Comments

@fabianocastello
Copy link

fabianocastello commented Sep 10, 2023

Hello. I am trying to use your examples. Thanks for sharing.

In the PDf notebook, we have this gist:

# Use FAISS to index the embeddings. This will allow us to perform a similarity search on the texts using the embeddings.
# https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/faiss.html
pdfDocSearch = FAISS.from_texts(textTexts, embeddings)

I am getting this error: InvalidRequestError:
"Must provide an 'engine' or 'deployment_id' parameter to create a".
I am using OPENAI_EMBEDDING_MODEL_NAME = "text-embedding-ada-002 (Version 2)"
but I think that this is wrong. I should specify a deployment that is based on a embedding model such as this above, correct?

Please advice.

Thank you.

@tedd-yuan
Copy link

Hello. I am trying to use your examples. Thanks for sharing.

In the PDf notebook, we have this gist:

# Use FAISS to index the embeddings. This will allow us to perform a similarity search on the texts using the embeddings.
# https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/faiss.html
pdfDocSearch = FAISS.from_texts(textTexts, embeddings)

I am getting this error: InvalidRequestError: "Must provide an 'engine' or 'deployment_id' parameter to create a". I am using OPENAI_EMBEDDING_MODEL_NAME = "text-embedding-ada-002 (Version 2)" but I think that this is wrong. I should specify a deployment that is based on a embedding model such as this above, correct?

Please advice.

Thank you.

Got the same error. Any hint? Thanks!

@cplemm
Copy link

cplemm commented Sep 17, 2023

Passing in model & engine when creating OpenAIEmbeddings as shown below is working for me:

embeddings = OpenAIEmbeddings(openai_api_key=OPENAI_API_KEY, model=OPENAI_EMBEDDING_MODEL_NAME, engine=OPENAI_EMBEDDING_DEPLOYMENT_NAME, client="azure", chunk_size=1)

OPENAI_EMBEDDING_MODEL_NAME is "text-embedding-ada-002" and OPENAI_EMBEDDING_DEPLOYMENT_NAME is the name of my specific model deployment in Azure OpenAI.

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

No branches or pull requests

3 participants