Skip to content

Latest commit

 

History

History
318 lines (215 loc) · 18.2 KB

api.md

File metadata and controls

318 lines (215 loc) · 18.2 KB

Shared Types

from openai.types import FunctionDefinition, FunctionParameters

Completions

Types:

from openai.types import Completion, CompletionChoice, CompletionUsage

Methods:

Chat

Completions

Types:

from openai.types.chat import (
    ChatCompletion,
    ChatCompletionAssistantMessageParam,
    ChatCompletionChunk,
    ChatCompletionContentPart,
    ChatCompletionContentPartImage,
    ChatCompletionContentPartText,
    ChatCompletionFunctionCallOption,
    ChatCompletionFunctionMessageParam,
    ChatCompletionMessage,
    ChatCompletionMessageParam,
    ChatCompletionMessageToolCall,
    ChatCompletionNamedToolChoice,
    ChatCompletionRole,
    ChatCompletionSystemMessageParam,
    ChatCompletionTokenLogprob,
    ChatCompletionTool,
    ChatCompletionToolChoiceOption,
    ChatCompletionToolMessageParam,
    ChatCompletionUserMessageParam,
)

Methods:

Edits

Types:

from openai.types import Edit

Methods:

Embeddings

Types:

from openai.types import CreateEmbeddingResponse, Embedding

Methods:

Files

Types:

from openai.types import FileContent, FileDeleted, FileObject

Methods:

Images

Types:

from openai.types import Image, ImagesResponse

Methods:

Audio

Transcriptions

Types:

from openai.types.audio import Transcription

Methods:

Translations

Types:

from openai.types.audio import Translation

Methods:

Speech

Methods:

  • client.audio.speech.create(**params) -> HttpxBinaryResponseContent

Moderations

Types:

from openai.types import Moderation, ModerationCreateResponse

Methods:

Models

Types:

from openai.types import Model, ModelDeleted

Methods:

FineTuning

Jobs

Types:

from openai.types.fine_tuning import FineTuningJob, FineTuningJobEvent

Methods:

FineTunes

Types:

from openai.types import FineTune, FineTuneEvent, FineTuneEventsListResponse

Methods:

Beta

Assistants

Types:

from openai.types.beta import Assistant, AssistantDeleted

Methods:

Files

Types:

from openai.types.beta.assistants import AssistantFile, FileDeleteResponse

Methods:

Threads

Types:

from openai.types.beta import Thread, ThreadDeleted

Methods:

Runs

Types:

from openai.types.beta.threads import RequiredActionFunctionToolCall, Run

Methods:

Steps

Types:

from openai.types.beta.threads.runs import (
    CodeToolCall,
    FunctionToolCall,
    MessageCreationStepDetails,
    RetrievalToolCall,
    RunStep,
    ToolCallsStepDetails,
)

Methods:

Messages

Types:

from openai.types.beta.threads import (
    MessageContentImageFile,
    MessageContentText,
    ThreadMessage,
    ThreadMessageDeleted,
)

Methods:

Files

Types:

from openai.types.beta.threads.messages import MessageFile

Methods: