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]: [Python API] create chat you don't own the dataset #4565

Open
senovr opened this issue Jan 21, 2025 · 2 comments
Open

[Question]: [Python API] create chat you don't own the dataset #4565

senovr opened this issue Jan 21, 2025 · 2 comments
Labels
question Further information is requested

Comments

@senovr
Copy link

senovr commented Jan 21, 2025

Describe your problem

Hi,
I am experimenting with Python API, and the following command resulting in error

rag_object.create_chat("my-assistant",dataset_ids=['HSE-laws-gte'])
File <@beartype(ragflow_sdk.ragflow.RAGFlow.create_chat) at 0x202b7749620>:97, in create_chat(__beartype_get_violation, __beartype_conf, __beartype_object_2210096193600, __beartype_object_2210096193792, __beartype_object_2210133773040, __beartype_func, *args, **kwargs)
...
.venv\Lib\site-packages\ragflow_sdk\ragflow.py:136, in RAGFlow.create_chat(self, name, avatar, dataset_ids, llm, prompt)
    [134](.venv/Lib/site-packages/ragflow_sdk/ragflow.py:134) if res.get("code") == 0:
    [135](.venv/Lib/site-packages/ragflow_sdk/ragflow.py:135)     return Chat(self, res["data"])
--> [136](.venv/Lib/site-packages/ragflow_sdk/ragflow.py:136) raise Exception(res["message"])

Exception: You don't own the dataset HSE-laws-gte

I am the only user of the deployed ragflow- nightly build, dataset is present and I am the owner of dataset.

Image version is 0.15.1-122-g367babda slim

@senovr senovr added the question Further information is requested label Jan 21, 2025
@KevinHuSh
Copy link
Collaborator

This means that the dataset is not created by the user who created this API key you use.

@senovr
Copy link
Author

senovr commented Jan 24, 2025

@KevinHuSh , thank you for the comment.

In fact, this is not always true
After further investigation, I find out, that I need to pass exactly dataset_id ( hash-like string).
It is fine, but:

  1. The message itself misleading.
  2. After playing with other different parts of the API (ie, datasets creation, chats creation) - very common error is "you do not own something" instead of "you set parameter A incorreclty, expected: has-like id, you provided: string"

Probably this should be transformed into feature request.

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