Commit
·
8dda658
1
Parent(s):
cefca95
:zap: separate the print statement from the structured output
Browse files
README.md
CHANGED
|
@@ -31,8 +31,11 @@ Made with love by [whatever](https://github.com/whatever)
|
|
| 31 |
|
| 32 |
We are using Qwen's format for conversations and function calling. Here's an example:
|
| 33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
```
|
| 35 |
-
>>> print(tokenizer.apply_chat_template(ds["train"][7500]["messages"], tokenize=False))
|
| 36 |
<|im_start|>system
|
| 37 |
You are a function calling AI model. You are provided with function signatures within <tools></tools> XML tags.You may call one or more functions to assist with the user query. Don't make assumptions about what values to plug into functions.Here are the available tools:<tools> [{'type': 'function', 'function': {'name': 'get_sunrise_sunset_time', 'description': 'Get the sunrise and sunset times for a specific location', 'parameters': {'type': 'object', 'properties': {'location': {'type': 'string', 'description': 'The city and state, e.g. San Francisco, CA'}, 'date': {'type': 'string', 'description': "The desired date in format 'YYYY-MM-DD'"}}, 'required': ['location', 'date']}}}, {'type': 'function', 'function': {'name': 'calculate_distance', 'description': 'Calculate the distance between two locations', 'parameters': {'type': 'object', 'properties': {'location1': {'type': 'string', 'description': 'The first location'}, 'location2': {'type': 'string', 'description': 'The second location'}}, 'required': ['location1', 'location2']}}}] </tools>Use the following pydantic model json schema for each tool call you will make: {'title': 'FunctionCall', 'type': 'object', 'properties': {'arguments': {'title': 'Arguments', 'type': 'object'}, 'name': {'title': 'Name', 'type': 'string'}}, 'required': ['arguments', 'name']}For each function call return a json object with function name and arguments within <tool_call></tool_call> XML tags as follows:
|
| 38 |
<tool_call>
|
|
|
|
| 31 |
|
| 32 |
We are using Qwen's format for conversations and function calling. Here's an example:
|
| 33 |
|
| 34 |
+
```python
|
| 35 |
+
print(tokenizer.apply_chat_template(ds["train"][7500]["messages"], tokenize=False))
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
```
|
|
|
|
| 39 |
<|im_start|>system
|
| 40 |
You are a function calling AI model. You are provided with function signatures within <tools></tools> XML tags.You may call one or more functions to assist with the user query. Don't make assumptions about what values to plug into functions.Here are the available tools:<tools> [{'type': 'function', 'function': {'name': 'get_sunrise_sunset_time', 'description': 'Get the sunrise and sunset times for a specific location', 'parameters': {'type': 'object', 'properties': {'location': {'type': 'string', 'description': 'The city and state, e.g. San Francisco, CA'}, 'date': {'type': 'string', 'description': "The desired date in format 'YYYY-MM-DD'"}}, 'required': ['location', 'date']}}}, {'type': 'function', 'function': {'name': 'calculate_distance', 'description': 'Calculate the distance between two locations', 'parameters': {'type': 'object', 'properties': {'location1': {'type': 'string', 'description': 'The first location'}, 'location2': {'type': 'string', 'description': 'The second location'}}, 'required': ['location1', 'location2']}}}] </tools>Use the following pydantic model json schema for each tool call you will make: {'title': 'FunctionCall', 'type': 'object', 'properties': {'arguments': {'title': 'Arguments', 'type': 'object'}, 'name': {'title': 'Name', 'type': 'string'}}, 'required': ['arguments', 'name']}For each function call return a json object with function name and arguments within <tool_call></tool_call> XML tags as follows:
|
| 41 |
<tool_call>
|