drishanarora commited on
Commit
fd27c98
·
verified ·
1 Parent(s): b0d32ee

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -4
README.md CHANGED
@@ -116,19 +116,19 @@ print(response)
116
  # 'I\'d be happy to check the temperature for you. Could you please let me know which location you\'re interested in? Please provide the city and country (e.g., "New York, USA").'
117
 
118
  messages.append({"role": "assistant", "content": 'I\'d be happy to check the temperature for you. Could you please let me know which location you\'re interested in? Please provide the city and country (e.g., "New York, USA").'})
119
- messages.append({"role": "user", "content": "I live in Paris."})
120
 
121
  response = generate_output(messages)
122
  print(response)
123
- # '<|tool▁calls▁begin|><|tool▁call▁begin|>function<|tool▁sep|>get_current_temperature\n```json\n{"location":"Paris, France"}\n```<|tool▁call▁end|><|tool▁calls▁end|>'
124
 
125
- tool_calls = [{"type": "function", "function": {"name": "get_current_temperature", "arguments": {"location": "Paris, France"}}}]
126
  messages.append({"role": "assistant", "tool_calls": tool_calls})
127
 
128
  messages.append({"role": "tool", "name": "get_current_temperature", "content": "22.0"})
129
  response = generate_output(messages)
130
  print(response)
131
- # The current temperature in Paris, France is 22.0°C.
132
  ```
133
 
134
  ### With SGLang
 
116
  # 'I\'d be happy to check the temperature for you. Could you please let me know which location you\'re interested in? Please provide the city and country (e.g., "New York, USA").'
117
 
118
  messages.append({"role": "assistant", "content": 'I\'d be happy to check the temperature for you. Could you please let me know which location you\'re interested in? Please provide the city and country (e.g., "New York, USA").'})
119
+ messages.append({"role": "user", "content": "I live in San Francisco."})
120
 
121
  response = generate_output(messages)
122
  print(response)
123
+ # '<|tool▁calls▁begin|><|tool▁call▁begin|>function<|tool▁sep|>get_current_temperature<|tool▁sep|>{"location": "San Francisco, USA"}<|tool▁call▁end|><|tool▁calls▁end|>'
124
 
125
+ tool_calls = [{"type": "function", "function": {"name": "get_current_temperature", "arguments": {"location": "San Francisco, USA"}}}]
126
  messages.append({"role": "assistant", "tool_calls": tool_calls})
127
 
128
  messages.append({"role": "tool", "name": "get_current_temperature", "content": "22.0"})
129
  response = generate_output(messages)
130
  print(response)
131
+ # The current temperature in San Francisco, USA is 22°C.
132
  ```
133
 
134
  ### With SGLang