agentconnect.providers.base_provider module¶
Base provider implementation for the AgentConnect framework.
This module provides the abstract base class for all model providers, defining the core functionality for generating responses from language models.
- class BaseProvider(api_key=None)¶
Bases:
ABCAbstract base class for all model providers.
This class defines the interface that all model providers must implement, including methods for generating responses, getting available models, and configuring the provider.
- Parameters:
api_key (str | None)
- api_key¶
API key for the provider
- async generate_response(messages, model, **kwargs)¶
Generate a response from the language model.
- Parameters:
- Return type:
- Returns:
Generated response text
- Raises:
Exception – If there is an error generating the response
- abstractmethod get_available_models()¶
Get a list of available models for this provider.