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

latest openai embedding support is not working and still assuming the model name is from hugging face #7296

Closed
1 task done
Felixchong882003 opened this issue Mar 4, 2024 · 3 comments
Assignees

Comments

@Felixchong882003
Copy link

Describe the bug
I saw the recent update 956bb63 on v1.25.0-rc1 says it is supporting latest OpenAI embedding model text-embedding-3-large and text-embedding-3-small, But when i use EmbeddingRetriever, it still try to find the huggingface model of text-embedding-3-large, instead of using OpenAI embedding.

Error message

 text-embedding-3-large is not a local folder and is not a valid model identifier listed on 'https://huggingface.co/models'
If this is a private repository, make sure to pass a token having permission to this repo either by logging in with `huggingface-cli login` or by passing `token=<your_token>`

Expected behavior
OpenAI instead of searching Huggingface for the OpenAI embedding model

Additional context
Seems like the new model name is not included in _infer_model_format of EmbeddingRetriever.

To Reproduce
initialize a retriever like the follow:

retriever = EmbeddingRetriever(
                    document_store=document_store,
                    embedding_model='text-embedding-3-large',
                    model_format=None,
                    use_gpu=False,
                    batch_size=8,
                    api_key=api_key,
                    max_seq_len=8192,
)

FAQ Check

System:

  • OS: Debian GNU/Linux 10 (buster)
  • GPU/CPU: Tesla T4 /Intel(R) Xeon(R) CPU @ 2.20GHz (GCP n1-standard-4)
  • Haystack version (commit or version number): v1.25.0-rc1
  • DocumentStore: elastic search
  • Reader: N/A
  • Retriever: text-embedding-3-large
@anakin87
Copy link
Member

anakin87 commented Mar 4, 2024

Thanks for reporting the issue!

A fix is coming...

@anakin87 anakin87 self-assigned this Mar 4, 2024
@anakin87
Copy link
Member

anakin87 commented Mar 4, 2024

fixed in #7297

@anakin87 anakin87 closed this as completed Mar 4, 2024
@mrm1001
Copy link

mrm1001 commented Mar 6, 2024

Hi @Felixchong882003, did the fix help solve your problem? I would love to hear more about how you're using Haystack.

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