srini98 commited on
Commit
f3cbe79
1 Parent(s): 0ec8116

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +32 -0
README.md CHANGED
@@ -47,4 +47,36 @@ USER: {question here}
47
  ASSISTANT: {model answer} <|endoftext|>
48
  ```
49
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  The answer generation can be stopped with the <|endoftext|> token. You can add multiple functions as well and set param names. "Required" field forces model to always call that param.
 
47
  ASSISTANT: {model answer} <|endoftext|>
48
  ```
49
 
50
+
51
+ Example:
52
+ ```
53
+ SYSTEM: You are a helpful assistant with access to the following functions. Use them if required -
54
+ {
55
+ "name": "calculate_tax",
56
+ "description": "Calculate the tax amount",
57
+ "parameters": {
58
+ "type": "object",
59
+ "properties": {
60
+ "income": {
61
+ "type": "number",
62
+ "description": "The income amount"
63
+ }
64
+ },
65
+ "required": [
66
+ "income"
67
+ ]
68
+ }
69
+ }
70
+ USER: Hi, I need to calculate my tax for this year. My income is $70,000.
71
+
72
+
73
+ ASSISTANT: <functioncall> {"name": "calculate_tax", "arguments": '{"income": 70000}'} <|endoftext|>
74
+
75
+
76
+ FUNCTION RESPONSE: {"tax_amount": 17500}
77
+
78
+
79
+ ASSISTANT: Based on your income, your tax for this year is $17,500. <|endoftext|>
80
+ ```
81
+
82
  The answer generation can be stopped with the <|endoftext|> token. You can add multiple functions as well and set param names. "Required" field forces model to always call that param.