Skip to content

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

@kaanx022

Description

@kaanx022

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions