Constructor
(abstract) new BaseProvider(config)
Create a provider instance
Parameters:
| Name | Type | Description |
|---|---|---|
config |
Object | Provider configuration |
- Source:
Methods
(async, abstract) chat(message, options) → {Promise.<Object>}
Send a chat message to the LLM
Parameters:
| Name | Type | Description |
|---|---|---|
message |
string | User message |
options |
Object | Additional options (systemPrompt, temperature, etc.) |
- Source:
Returns:
{ success: boolean, reply?: string, error?: string }
- Type
- Promise.<Object>
(abstract) getConfigFields() → {Array.<Object>}
Get required configuration fields
- Source:
Returns:
Array of field definitions with { name, label, type, required, placeholder, default }
- Type
- Array.<Object>
(abstract) getName() → {string}
Get provider name
- Source:
Returns:
Provider name
- Type
- string
(async) testConnection() → {Promise.<Object>}
Test provider connection
- Source:
Returns:
{ success: boolean, error?: string }
- Type
- Promise.<Object>
validateConfig(config) → {Object}
Validate configuration
Parameters:
| Name | Type | Description |
|---|---|---|
config |
Object | Configuration to validate |
- Source:
Returns:
{ valid: boolean, errors: Array
- Type
- Object