Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing 1. response_format and 2. Function Calling features #102

Open
kaanx022 opened this issue Dec 8, 2023 · 0 comments
Open

Missing 1. response_format and 2. Function Calling features #102

kaanx022 opened this issue Dec 8, 2023 · 0 comments

Comments

@kaanx022
Copy link

kaanx022 commented Dec 8, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant