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]: 工具调用可以支持openai 的api function call吗 #239

Open
lonngxiang opened this issue Sep 16, 2024 · 8 comments
Labels
feature New features

Comments

@lonngxiang
Copy link

Feature request / 功能建议

看现在支持transformers的 function call

@lonngxiang lonngxiang added the feature New features label Sep 16, 2024
@LDLINGLINGLING
Copy link
Collaborator

LDLINGLINGLING commented Sep 17, 2024

可以的,教程里给出了如何使用vllm的api进行function call https://modelbest.feishu.cn/wiki/ARJtwko3gisbw5kdPiDcDIOvnGg?from=from_copylink

@lonngxiang
Copy link
Author

可以的,教程里给出了如何使用vllm的api进行function call https://modelbest.feishu.cn/wiki/ARJtwko3gisbw5kdPiDcDIOvnGg?from=from_copylink

但这例子不是用的transformers的 function call吗?不是opeanai的接口,opeanai的接口是不需要再单独加载tokenizer的
image

@LDLINGLINGLING
Copy link
Collaborator

你好,tokenizer仅仅是在做数据处理,如果你不想加载tokenizer就按照tokenizer的方式进行数据处理,再调用api即可

@lonngxiang
Copy link
Author

你好,tokenizer仅仅是在做数据处理,如果你不想加载tokenizer就按照tokenizer的方式进行数据处理,再调用api即可

或者tokenizer也可以提供成api服务?最终还是希望能直接openai tools使用

image

@lonngxiang
Copy link
Author

你好,tokenizer仅仅是在做数据处理,如果你不想加载tokenizer就按照tokenizer的方式进行数据处理,再调用api即可
像这个例子是支持的
https://docs.vllm.ai/en/latest/getting_started/examples/openai_chat_completion_client_with_tools.html

@lonngxiang
Copy link
Author

看现在qwen2.5 用vllm推理后支持https://qwenlm.github.io/zh/blog/qwen2.5/

@Cppowboy
Copy link

Cppowboy commented Sep 20, 2024

可以使用https://github.com/OpenBMB/MiniCPM/blob/main/demo/minicpm3/function_call/openai_api_server.py 来启动一个支持function call的vllm server

@lonngxiang
Copy link
Author

可以使用https://github.com/OpenBMB/MiniCPM/blob/main/demo/minicpm3/function_call/openai_api_server.py 来启动一个支持function call的vllm server

有运行,但这边使用案例还额外需要加载transformers tokenizer去调用function的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New features
Projects
None yet
Development

No branches or pull requests

3 participants