ragflow icon indicating copy to clipboard operation
ragflow copied to clipboard

[Feature Request]: Support Function Calling?

Open willzzq opened this issue 1 year ago • 1 comments

Is there an existing issue for the same feature request?

  • [X] I have checked the existing issues.

Is your feature request related to a problem?

No response

Describe the feature you'd like

我们需要在使用知识库的同时,如果没有查到内容(或者指定前缀),就调用外部API获得内容并经过LLM处理后输出。 现在没有看到有此功能。 通过配置Agent可以做到吗?

Describe implementation you've considered

No response

Documentation, adoption, use case

No response

Additional information

No response

willzzq avatar Oct 20 '24 09:10 willzzq

It's coming soon.

KevinHuSh avatar Oct 21 '24 01:10 KevinHuSh

解决了?可能你理解错了我的意思。我们希望RAG系统能做到像OpenAI那样能配置外部函数(可自己添加函数,自定义名称、参数等),然后在RAG系统中,在用户像Agent提问时,可以根据内容进行判断(路由)是否调用外部函数。比如,用户问今天上海天气如何? 那么系统判断后调用天气预报函数,并将返回值输出给用户。

https://blog.csdn.net/weixin_41736460/article/details/139619520

willzzq avatar Oct 30 '24 04:10 willzzq

I think it could accomplish this goal by 'Invoke'. image

KevinHuSh avatar Oct 31 '24 02:10 KevinHuSh

I think it could accomplish this goal by 'Invoke'. image

好的,建议你参考一下linkAI的配置Function的UI界面。 对了,咱们系统现在已经实现了吗?好像没看到

willzzq avatar Oct 31 '24 02:10 willzzq

另外,语义路由(语义拆分)也要解决,比如用户问:帮我查一下我上季度的销售业绩。 如何找到那个正确的函数去调用。

willzzq avatar Oct 31 '24 03:10 willzzq

Appreciate your suggestion. You could scroll down to find the 'Invoke'. I think this is what you're talking about: image

KevinHuSh avatar Nov 01 '24 01:11 KevinHuSh

I think it could accomplish this goal by 'Invoke'. image

When I use POST method, where can I put the form data? And how can I change the Query params base on upstream result?

Match-Yang avatar Nov 02 '24 09:11 Match-Yang

image It can assign the upstreams' output to request parameters.

KevinHuSh avatar Nov 04 '24 02:11 KevinHuSh

image It can assign the upstreams' output to request parameters.

image

Do you mean I can use the key like this?

Match-Yang avatar Nov 04 '24 04:11 Match-Yang

No. The URL is just base url. If it's a GET request, it will obtain the parameter value and attach them to the url automatically.

KevinHuSh avatar Nov 05 '24 02:11 KevinHuSh

No. The URL is just base url. If it's a GET request, it will obtain the parameter value and attach them to the url automatically.

I don't get it. What do you mean by "attach them to the URL automatically"? How do you know the params I want to attach to the end of the URL? Could you please share some examples?

Match-Yang avatar Nov 05 '24 07:11 Match-Yang

The parameter comes from here: image

KevinHuSh avatar Nov 06 '24 02:11 KevinHuSh

cool!

DoItRightNow avatar Mar 24 '25 07:03 DoItRightNow