ychat icon indicating copy to clipboard operation
ychat copied to clipboard

Missing 1. response_format and 2. Function Calling features

Open kaanx022 opened this issue 1 year ago • 0 comments

Just marking the necessity of the response format and Function Calling features that was recently added by OpenAI to their API

response = openai.Completion.create(
  model="gpt-4",
  prompt="Translate the following English text to French: 'Hello, how are you?'",
  response_format={ "type": "json_object" }
)

this is an example py call for the response format which makes the response adhere to a format in the response and makes it return only JSON so it can be very easily parsed and worked with.

kaanx022 avatar Dec 08 '23 00:12 kaanx022