praval.providers.cohere๏
Cohere provider implementation for Praval framework.
Provides integration with Cohereโs chat models through their Chat API with support for conversation history.
Classes
|
Cohere provider for LLM interactions. |
- class praval.providers.cohere.CohereProvider(config)[source]๏
Bases:
objectCohere provider for LLM interactions.
Handles communication with Cohereโs chat models through the Chat API with conversation history support.
- __init__(config)[source]๏
Initialize Cohere provider.
- Parameters:
config โ AgentConfig object with provider settings
- Raises:
ProviderError โ If Cohere client initialization fails
- generate(messages, tools=None)[source]๏
Generate a response using Cohereโs Chat API.
- Parameters:
- Return type:
- Returns:
Generated response as a string
- Raises:
ProviderError โ If API call fails