Update README.md
Browse files
README.md
CHANGED
@@ -43,6 +43,21 @@ outputs = model.generate(inputs)
|
|
43 |
print(tokenizer.decode(outputs[0], skip_special_tokens=False)
|
44 |
```
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
## Evaluation
|
47 |
Needs to be done (Currently in Line for OpenLLM Leaderboard)
|
48 |
|
|
|
43 |
print(tokenizer.decode(outputs[0], skip_special_tokens=False)
|
44 |
```
|
45 |
|
46 |
+
## Tool Usage
|
47 |
+
|
48 |
+
The model has been trained to provide tool calls using the following template
|
49 |
+
```python
|
50 |
+
conversations = [
|
51 |
+
{
|
52 |
+
"role": "system",
|
53 |
+
"content": "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.\n<tools>\n[{'type': 'function', 'function': {'name': 'search_flights', 'description': 'Searches for flights based on departure and destination cities, dates, class, and other preferences.', 'parameters': {'type': 'object', 'properties': {'departure_city': {'type': 'string', 'description': 'The city from which the flight will depart.'}, 'destination_city': {'type': 'string', 'description': 'The destination city for the flight.'}, 'departure_date': {'type': 'string', 'description': 'The departure date for the flight.', 'format': 'date'}, 'return_date': {'type': 'string', 'description': 'The return date for the flight.', 'format': 'date'}, 'class': {'type': 'string', 'description': 'The class of the flight ticket.', 'enum': ['economy', 'business', 'first']}, 'flexible_cancellation': {'type': 'boolean', 'description': 'Indicates if the search should filter for flights with flexible cancellation policies.'}}, 'required': ['departure_city', 'destination_city', 'departure_date', 'return_date', 'class']}}}]\n</tools>\nFor each function call return a json object with function name and arguments within <tool_call> </tool_call> tags with the following schema:\n<tool_call>\n{'arguments': <args-dict>, 'name': <function-name>}\n</tool_call>\n"
|
54 |
+
},
|
55 |
+
{
|
56 |
+
"role": "user",
|
57 |
+
"content": "I'm planning a kayaking trip and looking to book flights from Los Angeles to Auckland. My departure is scheduled for July 10th, 2023, and I intend to return on July 24th, 2023. I would prefer to travel in economy class and would also like the option to have flexible cancellation policies for the tickets due to the uncertain nature of outdoor activities. Could you please search for flights that meet these criteria and provide me with the available options?"
|
58 |
+
}]
|
59 |
+
```
|
60 |
+
|
61 |
## Evaluation
|
62 |
Needs to be done (Currently in Line for OpenLLM Leaderboard)
|
63 |
|