ragflow icon indicating copy to clipboard operation
ragflow copied to clipboard

[Feature Request]: Examples on RAGFlow API

Open JinHai-CN opened this issue 1 year ago • 12 comments

Is there an existing issue for the same feature request?

  • [X] I have checked the existing issues.

Describe the feature you'd like

Although there is already documentation for the RAGFlow API, it would be easier for developers to use if specific examples were provided. This issue proposes creating examples for the RAGFlow SDK, and accessing HTTP interfaces with cURL.

Python SDK example: example/sdk HTTP API with cURL: example/http

JinHai-CN avatar Dec 31 '24 09:12 JinHai-CN

dataset related examples: https://github.com/infiniflow/ragflow/blob/main/example/sdk/dataset_example.py https://github.com/infiniflow/ragflow/blob/main/example/http/dataset_example.sh

JinHai-CN avatar Dec 31 '24 09:12 JinHai-CN

Hi I'd like to work on this, could you assign it to me? Thanks!

simin75simin avatar Jan 22 '25 03:01 simin75simin

Hi @simin75simin @KevinHuSh , just checking in, is this issue still active or are you currently working on it? I would love to help out if it's available. Thanks!

saishreyakumar avatar Jun 10 '25 05:06 saishreyakumar

Hi @simin75simin , just checking in, is this issue still active or are you currently working on it? I would love to help out if it's available. Thanks!

yeah, i think i'd get a pr in a few days, sorry I was working on other things before, i was also checking with other people on discord couple weeks ago regarding this once i got some time.

simin75simin avatar Jun 10 '25 05:06 simin75simin

is there any way chat/completions only by a file? llike this

{
        model: 'glm-4-flash',
        messages: formattedMessages,
        stream: true,
        temperature: 0.7,
        max_tokens: 9000,
        files: [
          {
            type: "file",
            id: "82b8653b-3399-4edb-97f6-34e9b4e7df67"
          },
          {
            type: "collection",
            id: "fcf35088-7f8a-47ed-9a2f-a410e0390d43"
          }
        ]
      }

bulolo avatar Jun 11 '25 06:06 bulolo

is there any way chat/completions only by a file? llike this

{
        model: 'glm-4-flash',
        messages: formattedMessages,
        stream: true,
        temperature: 0.7,
        max_tokens: 9000,
        files: [
          {
            type: "file",
            id: "82b8653b-3399-4edb-97f6-34e9b4e7df67"
          },
          {
            type: "collection",
            id: "fcf35088-7f8a-47ed-9a2f-a410e0390d43"
          }
        ]
      }

not sure what you mean?

simin75simin avatar Jun 11 '25 10:06 simin75simin

is there any way chat/completions only by a file? llike this

{
        model: 'glm-4-flash',
        messages: formattedMessages,
        stream: true,
        temperature: 0.7,
        max_tokens: 9000,
        files: [
          {
            type: "file",
            id: "82b8653b-3399-4edb-97f6-34e9b4e7df67"
          },
          {
            type: "collection",
            id: "fcf35088-7f8a-47ed-9a2f-a410e0390d43"
          }
        ]
      }

not sure what you mean?

api to talk with Specify file

bulolo avatar Jun 11 '25 10:06 bulolo

is there any way chat/completions only by a file? llike this

{
        model: 'glm-4-flash',
        messages: formattedMessages,
        stream: true,
        temperature: 0.7,
        max_tokens: 9000,
        files: [
          {
            type: "file",
            id: "82b8653b-3399-4edb-97f6-34e9b4e7df67"
          },
          {
            type: "collection",
            id: "fcf35088-7f8a-47ed-9a2f-a410e0390d43"
          }
        ]
      }

not sure what you mean?

api to talk with Specify file

i'd say no at this point but if you know better pls let me know

simin75simin avatar Jun 11 '25 12:06 simin75simin

english: i would better to support this api chat/completions with files params to chat with a Specify file

like open webui 's api https://docs.openwebui.com/getting-started/api-endpoints/#using-files-and-collections-in-chat-completions

Image

@simin75simin

or how to make a chat/completions to chat with a Specify file

中文:

现在ragflow api并没有提供一个能针对知识库中某个文件的对话api参数,是否支持,或者时候已经支持?

例如 像open webui的这种针对某个文件 Image

bulolo avatar Jun 11 '25 13:06 bulolo

english: i would better to support this api chat/completions with files params to chat with a Specify file

like open webui 's api https://docs.openwebui.com/getting-started/api-endpoints/#using-files-and-collections-in-chat-completions

Image

@simin75simin

or how to make a chat/completions to chat with a Specify file

中文:

现在ragflow api并没有提供一个能针对知识库中某个文件的对话api参数,是否支持,或者时候已经支持?

例如 像open webui的这种针对某个文件 Image

actually pls stop discussing this here as it's not relevant to the issue. consult the documentation for specific functionalities.

simin75simin avatar Jun 11 '25 14:06 simin75simin

I want to create an example that includes reading a file, chunking, extracting entities and relationships, conducting query recall, and generating the final answer. I think this is very beneficial for developers.

wwwqqyy avatar Jul 28 '25 02:07 wwwqqyy