-
Notifications
You must be signed in to change notification settings - Fork 23
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
feat: Integrate with agent/tool agent from go-llm #896
Comments
It's a pretty creative program. But only OpenAI's GPT chat completion API is supported. and use Model-Native Function Calls, the doc is https://platform.openai.com/docs/api-reference/chat/create#chat-create-function_call curl https://api.openai.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "gpt-3.5-turbo",
"messages": [
{
"role": "user",
"content": "What is the weather like in Boston?"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "get_current_weather",
"description": "Get the current weather in a given location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state, e.g. San Francisco, CA"
},
"unit": {
"type": "string",
"enum": ["celsius", "fahrenheit"]
}
},
"required": ["location"]
}
}
}
],
"tool_choice": "auto"
}' the output will be
from lm-sys/FastChat #2214 fastchat is not support it yet. And zhipuAI v4 support function_call. |
目前只有 ChatGLM3-6B 模型支持工具调用,而 ChatGLM3-6B-Base 和 ChatGLM3-6B-32K 模型不支持。 |
Qwen-Chat 的套路和我们现在的一致,使用react方法,把工具写在prompt里:
感觉如果我们也想让FastChat也实现OpenAI标准的 function_call 方法,也可以这么做。 |
Check if any assets we can reuse from https://github.com/natexcvi/go-llm.
The text was updated successfully, but these errors were encountered: