You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Just marking the necessity of the response format and Function Calling features that was recently added by OpenAI to their API
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.
The text was updated successfully, but these errors were encountered: