labring / FastGPT

FastGPT is a knowledge-based platform built on the LLMs, offers a comprehensive suite of out-of-the-box capabilities such as data processing, RAG retrieval, and visual AI workflow orchestration, letting you easily develop and deploy complex question-answering systems without the need for extensive setup or configuration.
https://tryfastgpt.ai
Other
17.7k stars 4.72k forks source link

Client message push #787

Open deerleo opened 9 months ago

deerleo commented 9 months ago

例行检查

功能描述

可暴露一个方法,可以随时给任意的chat推送消息。

应用场景

我创建了一个插件,可以生成视频,但是生成视频时间较长,容易遇到network error的情况,我希望在plugin的api接口写一个异步的方法,先给用户返回消息,终止当前workflow,后台继续运行,然后根据任务生成进度,推送消息到客户端

相关示例

c121914yu commented 9 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Routine inspection

Function description

A method can be exposed to push messages to any chat at any time.

Application Scenario

I created a plug-in that can generate videos, but it takes a long time to generate videos, and it is easy to encounter network errors. I hope to write an asynchronous method in the API interface of the plugin, first return a message to the user, terminate the current workflow, and continue in the background. Run, and then push messages to the client based on the task generation progress

Related Examples

c121914yu commented 9 months ago

是个好想法