Expand description
Language model interface: call options, prompt, tools, content, stream
parts, results and the LanguageModel trait.
Re-exports§
pub use call_options::CallOptions;pub use call_options::CallOptionsRecord;pub use call_options::ReasoningEffort;pub use call_options::ResponseFormat;pub use call_options::ToolChoice;pub use content::Content;pub use content::CustomKind;pub use content::InvalidCustomKind;pub use content::ProviderToolResult;pub use content::Source;pub use content::ToolCall;pub use finish_reason::FinishReason;pub use finish_reason::FinishReasonKind;pub use prompt::Prompt;pub use prompt::PromptMessage;pub use result::GenerateResult;pub use result::RequestMetadata;pub use result::ResponseMetadata;pub use result::StreamResult;pub use stream_part::StreamError;pub use stream_part::StreamErrorCode;pub use stream_part::StreamPart;pub use supported_urls::SupportedUrls;pub use tool::ToolDefinition;pub use usage::InputTokens;pub use usage::OutputTokens;pub use usage::Usage;pub use usage::add_token_counts;
Modules§
- call_
options - Call options passed to language model adapters.
- content
- Content produced by a language model call.
- finish_
reason - Finish reasons.
- prompt
- Specification-level prompt: the message list sent to a language model.
- result
- Results of language model calls and shared request/response metadata.
- stream_
part - Stream parts emitted by
do_stream. - supported_
urls - URL patterns a provider can fetch itself.
- tool
- Tool definitions passed to language models.
- usage
- Token usage reported by language models.
Traits§
- Language
Model - A text generation model.