Expand description
This module enables the implementation of chat completion on LLM providers
The main trait to implement is ChatCompletion
, which takes a ChatCompletionRequest
and
returns a ChatCompletionResponse
.
A chat completion request is comprised of a list of ChatMessage
to complete, with optionally
tool specifications. The response optionally contains a message and zero or more tool calls.
Re-exports§
pub use traits::*;
Modules§
Structs§
- Chat
Completion Request - A chat completion request represents a series of chat messages and tool interactions that can be send to any LLM.
- Chat
Completion Request Builder - Builder for
ChatCompletionRequest
. - Chat
Completion Response - A generic response from chat completions
- Chat
Completion Response Builder - Builder for
ChatCompletionResponse
. - Chat
Completion Response Delta - Chat
Completion Response Delta Builder - Builder for
ChatCompletionResponseDelta
. - Param
Spec - Parameters for tools
- Param
Spec Builder - Builder for
ParamSpec
. - Tool
Call - A tool call that can be executed by the executor
- Tool
Call Builder - Builder for
ToolCall
. - Tool
Spec - A typed tool specification intended to be usable for multiple LLMs
- Tool
Spec Builder - Builder for
ToolSpec
. - Usage
- Usage
Builder - Builder for
Usage
.
Enums§
- Chat
Completion Request Builder Error - Error type for ChatCompletionRequestBuilder
- Chat
Completion Response Delta Builder Error - Error type for ChatCompletionResponseDeltaBuilder
- Chat
Message - Inner
Param Type - Param
Spec Builder Error - Error type for ParamSpecBuilder
- Param
Type - Tool
Call Builder Error - Error type for ToolCallBuilder
- Tool
Output - Output of a
ToolCall
which will be added as a message for the agent to use. - Tool
Spec Builder Error - Error type for ToolSpecBuilder
- Usage
Builder Error - Error type for UsageBuilder