@elsikora/commitizen-plugin-commitlint-ai
Version:
AI-powered Commitizen adapter with Commitlint integration
74 lines (73 loc) • 2.36 kB
TypeScript
import type { ELLMProvider } from '../enum/llm-provider.enum';
import type { ApiKey } from '../value-object/api-key.value-object';
import { ECommitMode } from '../enum/commit-mode.enum';
/**
* Entity representing LLM configuration
*/
export declare class LLMConfiguration {
private readonly API_KEY;
private readonly MAX_RETRIES;
private readonly MODE;
private readonly MODEL;
private readonly PROVIDER;
private readonly VALIDATION_MAX_RETRIES;
constructor(provider: ELLMProvider, apiKey: ApiKey, mode: ECommitMode, model?: string, maxRetries?: number, validationMaxRetries?: number);
/**
* Get the API key
* @returns {ApiKey} The API key
*/
getApiKey(): ApiKey;
/**
* Get the maximum retries
* @returns {number} The maximum retries
*/
getMaxRetries(): number;
/**
* Get the commit mode
* @returns {ECommitMode} The commit mode
*/
getMode(): ECommitMode;
/**
* Get the model name
* @returns {string | undefined} The model name or undefined
*/
getModel(): string | undefined;
/**
* Get the LLM provider
* @returns {ELLMProvider} The LLM provider
*/
getProvider(): ELLMProvider;
/**
* Get the validation max retries
* @returns {number} The validation max retries
*/
getValidationMaxRetries(): number;
/**
* Check if mode is auto
* @returns {boolean} True if mode is auto
*/
isAutoMode(): boolean;
/**
* Check if mode is manual
* @returns {boolean} True if mode is manual
*/
isManualMode(): boolean;
/**
* Create a new configuration with a different API key
* @param {ApiKey} apiKey - The new API key
* @returns {LLMConfiguration} A new configuration with the updated API key
*/
withApiKey(apiKey: ApiKey): LLMConfiguration;
/**
* Create a new configuration with a different mode
* @param {ECommitMode} mode - The new mode
* @returns {LLMConfiguration} A new configuration with the updated mode
*/
withMode(mode: ECommitMode): LLMConfiguration;
/**
* Create a new configuration with updated model
* @param {string} model - The new model name
* @returns {LLMConfiguration} A new configuration with the updated model
*/
withModel(model: string): LLMConfiguration;
}