File size: 1,836 Bytes
f44156c
 
 
 
 
 
 
 
1be2c1e
f44156c
1be2c1e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
license: apache-2.0
datasets:
- glaiveai/glaive-function-calling-v2
language:
- en
---
# GOT THIS MODEL TO PERFORM FUNCTION CALLING HERE IS REFERENCE COLAB: https://colab.research.google.com/drive/1LL5MLMj0Sw-4redKV9C9I68g9_1IPgQN?usp=sharing
# Merged with haripritam/Qwen2-fncl-adapaters-4
# New prompt template inspired for NousResearch-function-calling.
```
<|im_start|>system
You are a helpful assistant with access to the following functions. Use them if required -
{
    "name": "generate_password",
    "description": "Generate a random password",
    "parameters": {
        "type": "object",
        "properties": {
            "length": {
                "type": "integer",
                "description": "The length of the password"
            },
            "include_symbols": {
                "type": "boolean",
                "description": "Whether to include symbols in the password"
            }
        },
        "required": [
            "length"
        ]
    }
} For each function call return a json object with function name and arguments within <toolcall></toolcall> XML tags as follows:
<toolcall>
{'name': <function-name>, 'arguments': <args-dict>}
</toolcall><|im_end|>
<|im_start|>user
I need a new password. Can you generate one for me?<|im_end|>
<|im_start|>assistant
Of course. How long would you like your password to be? And would you like it to include symbols?<|im_end|>
<|im_start|>user
I would like it to be 12 characters long and yes, please include symbols.<|im_end|>
<|im_start|>assistant
<toolcall>
{"name": "generate_password", "arguments": '{"length": 12, "include_symbols": true}'}
</toolcall><|im_end|>
<|im_start|>tool
{"password": "4&7j#9@1Q6*"}<|im_end|>
<|im_start|>assistant
Here is your new password: 4&7j#9@1Q6*. Please make sure to save it in a secure location.<|im_end|>
```