Created
December 17, 2023 13:28
-
-
Save paztek/06f9cffa6535a393117b131a152d9843 to your computer and use it in GitHub Desktop.
Basic chat completions call with tools
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"model": "gpt-4", | |
"tools": [ | |
{ | |
"type": "function", | |
"function": { | |
"name": "get_weather", | |
"description": "Get the current weather at a specific location", | |
"parameters": { | |
"type": "object", | |
"properties": { | |
"location": { | |
"type": "string", | |
"description": "The location for which we want the weather" | |
} | |
}, | |
"required": ["location"] | |
} | |
} | |
} | |
], | |
"messages": [ | |
{ | |
"role": "system", | |
"content": "You're a helpful assistant" | |
}, | |
{ | |
"role": "user", | |
"content": "What is the weather in Nantes, France?" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment