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

[Question]: RAGFlow does not connect to Together.ai, Hugging Face and Alibaba Cloud. Please help #3865

Closed
wouldbe12 opened this issue Dec 4, 2024 · 4 comments
Labels
question Further information is requested

Comments

@wouldbe12
Copy link

Describe your problem

RAGFlow does not connect to Together.ai, Hugging Face and Alibaba Cloud.

My settings for Together.ai via Settings / Model Providers are as follows:

Model Name: Qwen/Qwen2.5-72B-Instruct-Turbo
Base url: https://api.together.xyz/v1/chat/completions
API: [my api]
Max tokens: 8192

ERROR: Fail to access model(Qwen/Qwen2.5-72B-Instruct-Turbo).ERROR...

My settings for Hugging Face are as follows:

Model Name: Qwen/Qwen2.5-72B-Instruct
Base url: https://api-inference.huggingface.co/models/Qwen/Qwen2.5-72B-Instruct/v1/chat/completions
API: [my api]
Max tokens: 8192

ERROR: Fail to access model(Qwen/Qwen2.5-72B-Instruct___HuggingFace).ERROR: Error code: 400 - {'error': 'Authorization header is correct, but the token seems invalid'}

My setting for Alibaba

Model: Tonqui Quianwen (chosen from the list of model in Setting / Model Providers)
Api: [my api at Alibaba Cloud]

ERROR: Fail to access model(gte-rerank) using this api key.'text' Fail to access model(qwen-long) using this api key.ERROR: ERROR: Invalid API-key provided. Fail to access model(qwen-plus) using this api key.ERROR: ERROR: Invalid API-key provided. Fail to access model(qwen-turbo) using this api key.ERROR: ERROR: Invalid API-key provided. Fail to access embedding model(text-embedding-v2) using this api key.Account abnormal. Please ensure it's on good standing to use QWen's text-embedding-v2 Fail to access embedding model(text-embedding-v3) using this api key.Account abnormal. Please ensure it's on good standing to use QWen's text-embedding-v3

These apis work for other aps, so the problem is not likely related to them.

Please help.

@wouldbe12 wouldbe12 added the question Further information is requested label Dec 4, 2024
@kunkeji
Copy link
Contributor

kunkeji commented Dec 5, 2024

The error message is written very clearly, the api-key is incorrect

KevinHuSh added a commit that referenced this issue Dec 5, 2024
### What problem does this PR solve?

#3865

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
@CRTTV
Copy link

CRTTV commented Dec 15, 2024

Was a solution ever found for this? I am having the same issue. The API Key fails only on RAGFlow. The same key works on other programs. Any help is greatly appreciated.

@wouldbe12
Copy link
Author

No solution found for me yet. :( My Together AI, HuggingFace and Alibaba API keys don't work with RAGFlow.

I have only been able to add CHAT Together AI model with an endpoint that is different from their standard recommended (the one that worked was api.together.xyz/v1 rather then api.together.xyz/v1/chat/completions).

But I was unable to connect any EMBEDDING model from Together.ai with the endpoints provided in their specs and my API keys. At the same time their embedding models work if I access them and log in via a python script provided on their website, so the problem is clearly with RAGFlow while the Together AI API works.

Unfortunately, I have only been successfully in connected OpenAI models to RAGFlow.

@KevinHuSh, @CRTTV, I believe the problem is in the RAGFlow code. Any thoughts?

@CRTTV
Copy link

CRTTV commented Dec 18, 2024

I just updated to the latest release and the problem persists. On the logs I get a "HTTP/1.1 400 bad request". I have tried several different versions of the URLs provided in Huggingface and they don't work.
I have tried:
https://api-inference.huggingface.co
https://api-inference.huggingface.co/v1/
https://api-inference.huggingface.co/models/Qwen/Qwen2.5-72B-Instruct/v1/chat/completions
https://api-inference.huggingface.co/models/Qwen/Qwen2.5-72B-Instruct/v1
https://api-inference.huggingface.co/models/Qwen/Qwen2.5-72B-Instruct

These all have the same error message: "The authorization header is correct, but the token seems invalid"

I am currently using the same API Key in Open WebUI and am able to access and use the model without any issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants