#Trying to use new function calling on GPT4, getting InvalidRequestError

1 messages · Page 1 of 1 (latest)

hearty summit
#
response = openai.ChatCompletion.create(
 model="gpt-4-0613", 
        messages=[
            {"role": "system", "content": "prompt"
            {"role": "user", "content": conversation} #a long string of  user:msg, user:msg
        ],
        
         functions=[
        {
            "name": "fetch_top",
            "description": "a real description",
            "parameters": {
                "type": "object",
                "properties": {
                    "all_gees": {
                        "type": "array",
                        "gee": {
                            "type": "string",
                            "description": "a small string based on the real description"
                        },
                        "description": "an array of gees"
                    }
                },
                "required": ["all_gees"]
            }
        }
        ],
        function_call="auto",
        )```