How to call functions with chat models - Weather Query Response
{'role': 'assistant', 'content': 'In which city and state would you like to know the current weather?'} Once we provide the missing information, it will generate the appropriate function arguments for us. messages.append({'role': 'user', 'content': 'I'm in Glasgow, Scotland.'}) chat_response = chat_completion_request( messages, functions=functions ) assistant_message = chat_response.json()['choices'][0]['message'] messages.append(assistant_message) assistant_message