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.
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 - Chat
Completion Response Builder - Builder for
ChatCompletionResponse
. - 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
.
Enums§
- Chat
Completion Request Builder Error - Error type for ChatCompletionRequestBuilder
- Chat
Message - 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
Traits§
- Chat
Completion - Tool
- The
Tool
trait is the main interface for chat completion and agent tools.