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

[Feature Request]: RAGFlow API proposal #1102

Open
4 of 46 tasks
JinHai-CN opened this issue Jun 8, 2024 · 6 comments
Open
4 of 46 tasks

[Feature Request]: RAGFlow API proposal #1102

JinHai-CN opened this issue Jun 8, 2024 · 6 comments

Comments

@JinHai-CN
Copy link
Contributor

JinHai-CN commented Jun 8, 2024

Is there an existing issue for the same feature request?

  • I have checked the existing issues.

Describe the feature you'd like

RAGFlow's API interfaces are not enough and theAPI are not RESTful style. The goal of this issue is to propose the RESTFul APIs which covers most functions of RAGFlow.

Knowledge base

Content management in knowledge base

  • upload files
  • download files
  • remove files
  • update file attributes(name, enable status, ...)
  • list files
  • get the description of a specific file
  • start parsing a file
  • abort file parsing
  • get parsing progress
  • get the chunk list of a parsed file
  • remove chunks of a parsed file
  • download/fetch a chunk of a parsed file
  • update the chunk status
  • insert a new chunk to a parse file
  • retrieval test on a specific knowledge base

File management

  • create a directory
  • remove directories from a directory
  • move a directory
  • copy a directory
  • get the description of a specific directory
  • list file or directory from a parent directory
  • upload files into a specific directory
  • remove files from a specific directory
  • download files from a specific directory
  • move file
  • copy file
  • attach files to a knowledge base.
  • get the description of a specific file

AI assistant management

  • create an assistant
  • remove assistants
  • list assistants
  • update assistant config
  • get the description of a specific assitant

Model management

  • list models
  • get the description of a specific model

Conversation management

  • create a conversation
  • delete conversations
  • list conversations
  • chat
  • get the conversation history.

Related issues: #345 #717

@Scoutink
Copy link

Scoutink commented Jun 8, 2024

This is exactly what I am looking for...

@JinHai-CN JinHai-CN pinned this issue Jun 8, 2024
@JinHai-CN JinHai-CN mentioned this issue Jun 8, 2024
17 tasks
@yangboz
Copy link

yangboz commented Jun 18, 2024

Is there an existing issue for the same feature request?

  • I have checked the existing issues.

Describe the feature you'd like

RAGFlow's API interfaces are not enough and theAPI are not RESTful style. The goal of this issue is to propose the RESTFul APIs which covers most functions of RAGFlow.

Knowledge base

  • create knowledge base API: create dataset #1106
  • remove knowledge base
  • update knowledge base
  • list knowledge bases
  • get the description of a specific knowledge base

Content management in knowledge base

  • upload files
  • download files
  • remove files
  • update file attributes(name, enable status, ...)
  • list files
  • get the description of a specific file
  • start parsing a file
  • abort file parsing
  • get parsing progress
  • get the chunk list of a parsed file
  • remove chunks of a parsed file
  • download/fetch a chunk of a parsed file
  • update the chunk status
  • insert a new chunk to a parse file
  • retrieval test on a specific knowledge base

File management

  • create a directory
  • remove directories from a directory
  • move a directory
  • copy a directory
  • get the description of a specific directory
  • list file or directory from a parent directory
  • upload files into a specific directory
  • remove files from a specific directory
  • download files from a specific directory
  • move file
  • copy file
  • attach files to a knowledge base.
  • get the description of a specific file

AI assistant management

  • create an assistant
  • remove assistants
  • list assistants
  • update assistant config
  • get the description of a specific assitant

Model management

  • list models
  • get the description of a specific model

Conversation management

  • create a conversation
  • delete conversations
  • list conversations
  • chat
  • get the conversation history.

Related issues: #345 #717

I am wondering with flaskrest,flaskrestplus will helps a lot. or flask_restx

@jeremi
Copy link

jeremi commented Jun 19, 2024

  • create a knowledge base
    is it supposed to work? I could not make it work.
    There seem to be a few issues with the SDK, including configuring the wrong URL path.

for me:
self.api_url = f"{base_url}/api/{version}"
should be:
self.api_url = f"{base_url}/{version}/api"

Also even after this change I could not call the create dataset endpoint.

@cecilia-uu
Copy link
Contributor

cecilia-uu commented Jun 19, 2024

  • create a knowledge base
    is it supposed to work? I could not make it work.
    There seem to be a few issues with the SDK, including configuring the wrong URL path.

for me: self.api_url = f"{base_url}/api/{version}" should be: self.api_url = f"{base_url}/{version}/api"

Also even after this change I could not call the create dataset endpoint.

Hi jeremi, thanks for your question. I would like to inform you that we have introduced a newly proposed API endpoint - http://<host_address>/api/v1/. The previous URL you mentioned is now deprecated . If you want to create a dataset, you can use http://<host_address>/api/v1/dataset by POST request.

@jeremi
Copy link

jeremi commented Jun 19, 2024

I tried it by building the latest main, and it does not work; I get a 404 with some HTML as a returned value.

If I invert API and version number, I get a JSON response, but with a 404 in the body:

200
b'{"data":null,"retcode":100,"retmsg":"<NotFound \'404: Not Found\'>"}\n'

@cecilia-uu
Copy link
Contributor

Could you share your screenshot for the input and output?

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

5 participants