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]: Does it support API Key for Xinference #2492

Open
0000sir opened this issue Sep 19, 2024 · 2 comments
Open

[Question]: Does it support API Key for Xinference #2492

0000sir opened this issue Sep 19, 2024 · 2 comments
Labels
question Further information is requested

Comments

@0000sir
Copy link
Contributor

0000sir commented Sep 19, 2024

Describe your problem

I deployed models locally with Xinference, both LLM and embedding models, with API key authorization enabled.
When I configure RAGFlow for Xinference models, there's a 401 error occurred, I noticed a place holder in the text box says "for locally deployed model, ignore this", is that means there's no authorization support for local models?

The API key works fine when I configure it in OneAPI service.

Thank you for your help.

BTW: I found a QA says streaming output is not supported in RAGFlow and still working on it, when will we see it

@0000sir 0000sir added the question Further information is requested label Sep 19, 2024
@0000sir
Copy link
Contributor Author

0000sir commented Sep 19, 2024

chat_model.py line 100

class XinferenceChat(Base):
def init(self, key=None, model_name="", base_url=""):
if not base_url:
raise ValueError("Local llm url cannot be None")
if base_url.split("/")[-1] != "v1":
base_url = os.path.join(base_url, "v1")
key = "xxx"
super().init(key, model_name, base_url)

It looks like the api key not used while sending requests.
Why you set key to xxx here??

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

#2492

### Type of change

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

Streaming is supported.

Halfknow pushed a commit to Halfknow/ragflow that referenced this issue Nov 11, 2024
### What problem does this PR solve?

infiniflow#2492

### Type of change

- [x] Bug Fix (non-breaking change which fixes an 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

2 participants