Expand description
Strongly typed request and response definitions for OpenAI and OpenRouter endpoints.
Structs§
- Chat
Choice - A choice generated by the model in a non-streaming completion.
- Chat
Chunk Choice - A choice in a streaming chunk.
- Chat
Chunk Delta - Streaming chunk delta for a message.
- Chat
Completion Chunk - Server-Sent Events chunk payload for streaming chat completions.
- Chat
Completion Request - Request payload for
/chat/completions. - Chat
Completion Response - Response returned from
/chat/completionsfor non-streaming requests. - Chat
Message - A message in a chat conversation.
- Chunk
Function Call - Function call fragments in streaming chunks.
- Chunk
Tool Call - Tool call delta within a streaming chunk.
- Embedding
Data - Vector embedding for a single input text item.
- Embedding
Request - Request payload for
/embeddings. - Embedding
Response - Response returned from
/embeddings. - Function
Call - Function invocation details in a tool call.
- Function
Definition - Schema definition for a callable function.
- List
Models Response - Response returned from
/models. - Model
Info - Information describing a model available on the endpoint.
- Tool
Call - A tool call invoked by the model.
- Tool
Definition - Specification of a tool the model can call.
- Usage
- Token usage details for request and response.
Enums§
- Embedding
Input - Input text(s) for generating vector embeddings.
- Role
- Chat message author role.