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

Support Mistral format tools #5473

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

Support Mistral format tools #5473

wants to merge 2 commits into from

Conversation

AlongWY
Copy link
Contributor

@AlongWY AlongWY commented Sep 18, 2024

What does this PR do?

Support Mistral format tools

<s>[AVAILABLE_TOOLS] [{"type": "function", "function": {"name": "get_news", "description": "获取最新新闻文章", "parameters": {"type": "object", "properties": {"category": {"type": "string", "description": "要检索的新闻文章类别"}, "country": {"type": "string", "description": "获取新闻文章的国家"}}, "required": ["category"]}}}, {"type": "function", "function": {"name": "search_books", "description": "根据提供的标准搜索书籍", "parameters": {"type": "object", "properties": {"title": {"type": "string", "description": "这本书的标题"}, "author": {"type": "string", "description": "这本书的作者"}, "genre": {"type": "string", "description": "这本书的类型"}}}}}][/AVAILABLE_TOOLS][INST] 你能帮我找到最新的美国体育新闻吗?[/INST][TOOL_CALLS] [{"name": "get_news", "arguments": {"category": "运动", "country": "美国"}}][TOOL_RESULTS] {"content": {"title": "NBA总决赛:湖人队对阵热火队", "link": "NBA官方网站"}}[/TOOL_RESULTS][TOOL_RESULTS] {"content": {"title": "NFL:爱国者队击败酋长队", "link": "https://www.nfl.com/新闻"}}[/TOOL_RESULTS][TOOL_RESULTS] {"content": {"title": "MLB:道奇队赢得世界系列赛", "link": "https://www.mlb.com/新闻"}}[/TOOL_RESULTS] 1. NBA总决赛:湖人队对阵热火队
2. NFL:爱国者队击败酋长队
3. MLB:道奇队赢得世界系列赛

Before submitting

@AlongWY
Copy link
Contributor Author

AlongWY commented Oct 18, 2024

@hiyouga 你能看看这个分支吗?这里主要是为了支持 mistral 格式的 parallel function call

@hiyouga hiyouga added the pending This problem is yet to be addressed label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending This problem is yet to be addressed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants