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

add api server #417

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

add api server #417

wants to merge 2 commits into from

Conversation

007gzs
Copy link

@007gzs 007gzs commented Dec 19, 2024

抛砖引玉,增加一个自用的非openai格式的apiserver(openai貌似没看到单次请求返回多条结果的格式)
#247

@@ -0,0 +1,71 @@

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个功能适合注册为一个llm class,参考这个,即当在agent中指定使用这个llm时,会自动启动这个llm server,之后进行交互。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LLM_REGISTRY 是增加支持的后端llm接口把,我这个是接入qwen-agent后提供给前端使用的

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

和WebUI是平级的,WebUI是提供一个webui的供用户使用的界面,我的pr提供的是http api形式的供用户调用的api。
具体是实现 #247 (comment) 中提到的

(推荐,但qwen-agent还没自带这个功能,开发中)用户自行学习下FastAPI,通过FastAPI把qwen-agent封装成http api服务(如果有遇到阻塞问题,可以开多线程解决)。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get了,我尽快测试下,没问题的话会merge这个PR

@tuhahaha
Copy link
Collaborator

您好,感谢贡献!如上面评论的,希望可以把这个接口规范为一个llm class,这样可以用原始的方式调用,而不引入新的接口

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

Successfully merging this pull request may close these issues.

2 participants