How to call functions with chat models - Weather Query
If we prompt the model about the current weather, it will respond with some clarifying questions. messages = [] messages.append({'role': 'system', 'content': 'Don't make assumptions about what values to plug into functions. Ask for clarification if a user request is ambiguous.'}) messages.append({'role': 'user', 'content': 'What's the weather like today'}) chat_response = chat_completion_request( messages, functions=functions ) assistant_message = chat_response.json()['choices'][0]['message'] messages.append(assistant_message) assistant_message