Skip to main content

3 docs tagged with "openai"

View all tags

OpenAI API Uses

The provided OpenAI API client structure reveals several common use cases for interacting with OpenAI's models:

OpenAI Chat Completion

The most common use case for the OpenAI API in Python is generating chat completions. This involves sending a list of messages to a specified model and receiving a generated response. The API supports both synchronous (blocking) and asynchronous (non-blocking) calls, and responses can be received as a single object or streamed as chunks.