Expand description
The operations a Wire can perform.
Each operation declares its request, event, end and response types and
the fold one reply goes through. Completion streams events; most
others answer with one whole document, folded by Whole. Listings
follow their cursors above the driver: each page is one call.
use rig_core::operation::{Completion, Embedding};
use rig_core::wire::Operation;
fn streams<Op: Operation>() {}
streams::<Completion>();
streams::<Embedding>();Structs§
- Audio
Generation audio - Generating speech.
- Call
Fragment - What one fragment of a buffered tool call carries.
- Completion
- Generating an assistant turn, unary or streamed.
- Embedding
- Embedding a batch of texts.
- Finish
- What the provider sends when it ends a completion reply.
- Image
Embedding - Embedding a batch of images from their encoded file bytes.
- Image
Generation image - Generating an image.
- Model
Listing - Lists provider models, one page per call.
- Model
Page - One page of a model listing, and the cursor of the page after it.
- Rerank
- Ordering documents by relevance to a query.
- Rerank
Request - A reranking request: the query, the documents to order, and the batch limit’s subject.
- Transcription
- Transcribes audio using provider-specific request encoding.
- Turn
- The completion fold. The driver and the bus writer build it; no other code can feed one.
- Verify
- Checks credentials using response status. HTTP 401/403 indicate invalid authentication; status-only decoders do not interpret the response body.
- Verify
Decoder - Accepts any body, including an empty one, after driver status validation. Endpoints requiring body validation must use another decoder.
- Whole
- The fold of an operation whose reply is one whole answer: it has no events, and the provider’s end is the response. The stamp writes what the driver learned about the reply onto it.
Enums§
- Block
- What a provider item becomes when it opens.
Functions§
- merge
- Merge
deltaintoitem: each string field buttypeappends to the item’s string of that key, an array extends the item’s array, and any other value replaces the key. A delta kind rig has never seen still lands in the item.