Skip to main content

Module pb

Module pb 

Source
Expand description

Prost-generated typed model, compiled from proto/llmleaf/v1/llmleaf.proto by build.rs. This is the “real codegen” proof: the proto genuinely compiles into the crate and the generated messages are available here as a typed mirror.

These types are NOT what the SDK serialises onto the wire — prost emits protobuf-binary-shaped types (oneofs, i32 enums, no OpenAI JSON casing). The wire uses the hand-written serde structs in [crate::types]. Use this module when you want the canonical proto representation (e.g. to interop with a protobuf toolchain).

Modules§

chat_message
Nested message and enum types in ChatMessage.
content_part
Nested message and enum types in ContentPart.
tool_choice
Nested message and enum types in ToolChoice.

Structs§

Architecture
BatchCounts
BatchCreateRequest
BatchError
BatchHandle
BatchRequestItem
BatchResponse
BatchResultLine
One line of the JSONL results stream (GET /v1/batches/{id}/results).
ChatCompletionChunk
ChatMessage
ChatRequest
ChatResponse
Choice
ChunkChoice
ContentPart
A single content part for multimodal messages: {“type”:“text”,“text”:“…”} {“type”:“image_url”,“image_url”:{“url”:“…”,“detail”:“auto”}}
ContentParts
Delta
Streaming SSE frame: data: <ChatCompletionChunk JSON>\n\n, terminated by the sentinel line data: \[DONE\].
Embedding
EmbeddingRequest
EmbeddingResponse
ErrorBody
ErrorResponse
The canonical error envelope returned by every endpoint: {“error”:{“message”:…}}.
FunctionCall
A function the model called. arguments is a JSON-encoded string (OpenAI shape).
FunctionCallDelta
Incremental tool-call fragment on a streaming delta; fields arrive piecemeal.
FunctionDef
A function the model MAY call. parameters is a raw JSON Schema string.
FunctionName
ImageUrlPart
ListModelsResponse
ModelEndpoint
Admin-only fallback-chain entry (present only with a valid x-admin-token).
ModelEntry
NamedToolChoice
Pricing
ResponseFormat
response_format: {“type”:“text”|“json_object”|“json_schema”, “json_schema”: {…}}
SpeechRequest
TextPart
ToolCall
ToolCallDelta
ToolChoice
tool_choice is either a mode string (“auto”|“none”|“required”) or an object pinning a specific function: {“type”:“function”,“function”:{“name”:“…”}}.
ToolDef
TopProvider
TranscriptionRequest
The audio file itself is sent as the multipart file part, NOT in this message; these are the accompanying form fields.
TranscriptionResponse
For response_format json/verbose_json. text/srt/vtt return a plain-text body.
Usage
Token accounting echoed on every response. cost_usd is an llmleaf addition (real-time price from the bundled pricing dataset); it is null/absent when the model has no known price.
Voice
VoicesResponse

Enums§

BatchStatus
FinishReason
Role