VibeCluster.Llm.BaseLLMClient 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
Helper function to make HTTP requests to LLM providers with proper error handling
Helper function to make streaming HTTP requests to LLM providers with proper error handling
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