Skip to main content

Module types

Module types 

Source
Expand description

Strongly typed request and response definitions for OpenAI and OpenRouter endpoints.

Structs§

ChatChoice
A choice generated by the model in a non-streaming completion.
ChatChunkChoice
A choice in a streaming chunk.
ChatChunkDelta
Streaming chunk delta for a message.
ChatCompletionChunk
Server-Sent Events chunk payload for streaming chat completions.
ChatCompletionRequest
Request payload for /chat/completions.
ChatCompletionResponse
Response returned from /chat/completions for non-streaming requests.
ChatMessage
A message in a chat conversation.
ChunkFunctionCall
Function call fragments in streaming chunks.
ChunkToolCall
Tool call delta within a streaming chunk.
EmbeddingData
Vector embedding for a single input text item.
EmbeddingRequest
Request payload for /embeddings.
EmbeddingResponse
Response returned from /embeddings.
FunctionCall
Function invocation details in a tool call.
FunctionDefinition
Schema definition for a callable function.
ListModelsResponse
Response returned from /models.
ModelInfo
Information describing a model available on the endpoint.
ToolCall
A tool call invoked by the model.
ToolDefinition
Specification of a tool the model can call.
Usage
Token usage details for request and response.

Enums§

EmbeddingInput
Input text(s) for generating vector embeddings.
Role
Chat message author role.