LlmEx.ClientBehaviour behaviour (LlmEx v0.1.0)
View SourceDefines a common behaviour interface for all LLM clients. This module establishes a contract that all LLM client implementations must fulfill.
Summary
Callbacks
Converts a Message struct to the provider-specific format.
Streams a chat response from the LLM to the given process.
Converts a Tool struct to the provider-specific format.
Functions
Invoked when a module uses LlmEx.ClientBehaviour. Implements default functionality for the client.
Callbacks
Converts a Message struct to the provider-specific format.
Parameters
message
- The Message struct to convert
Streams a chat response from the LLM to the given process.
Parameters
messages
- List of Message structs representing the conversation historymessage_id
- ID for the response messagepid
- The process ID to stream the response toopts
- Options for the request (model, temperature, etc.)
Converts a Tool struct to the provider-specific format.
Parameters
tool
- The Tool struct to convert