Module format

Module format 

Source
Expand description

The common format for requests. This mostly hews to the OpenAI format except some response fields are made optional to accomodate different model providers.

Structs§

ChatChoice
A single choice in a chat
ChatChoiceDelta
A delta in a streaming chat choice
ChatMessage
A single message in a chat
ChatRequest
The request that can be submitted to the proxy, for transformation and submission to a provider.
ChatRequestTransformation
For providers that conform almost, but not quite, to the OpenAI spec, these transformations apply small changes that can alter the request in place to the form needed for the provider.
ChatResponse
A chat response, in non-chunked format
FunctionTool
Represents the function details of a tool
RequestInfo
Metadata about the request, from the proxy.
ResponseInfo
Metadata about the response, from the provider.
StreamOptions
Stream options for OpenAI. This is automatically set by the proxy when streaming. You can omit it in your requests.
Tool
Represents a tool that can be used by the OpenAI model
ToolCall
Represents a call to a tool by the OpenAI model
ToolCallFunction
Represents the function details of a tool call
UsageResponse
Counts of prompt, completion, and total tokens

Enums§

FinishReason
StreamingResponse
Part of a streaming response, returned from the proxy

Type Aliases§

SingleChatResponse
A non-streaming chat response
StreamingChatResponse
A chunk of streaming response
StreamingResponseReceiver
A channel that can receive streaming responses
StreamingResponseSender
A channel on which streaming responses can be sent