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§
- ChatCompletion Request 
- A chat completion request represents a series of chat messages and tool interactions that can be send to any LLM.
- ChatCompletion Request Builder 
- Builder for ChatCompletionRequest.
- ChatCompletion Response 
- ChatCompletion Response Builder 
- Builder for ChatCompletionResponse.
- ParamSpec 
- Parameters for tools
- ParamSpec Builder 
- Builder for ParamSpec.
- ToolCall 
- A tool call that can be executed by the executor
- ToolCall Builder 
- Builder for ToolCall.
- ToolSpec 
- A typed tool specification intended to be usable for multiple LLMs
- ToolSpec Builder 
- Builder for ToolSpec.
Enums§
- ChatCompletion Request Builder Error 
- Error type for ChatCompletionRequestBuilder
- ChatMessage 
- ParamSpec Builder Error 
- Error type for ParamSpecBuilder
- ParamType 
- ToolCall Builder Error 
- Error type for ToolCallBuilder
- ToolOutput 
- Output of a ToolCallwhich will be added as a message for the agent to use.
- ToolSpec Builder Error 
- Error type for ToolSpecBuilder
Traits§
- ChatCompletion 
- Tool
- The Tooltrait is the main interface for chat completion and agent tools.