Documentation
¶
Overview ¶
Package store persists user-selected LLM providers and credentials.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangeDefault ¶
func ChangeDefault(Model types.LLMProvider) error
ChangeDefault updates the default LLM provider selection in the config.
func DeleteModel ¶
func DeleteModel(Model types.LLMProvider) error
DeleteModel removes the specified provider from the saved configuration.
func Save ¶
func Save(LLMConfig LLMProvider) error
Save persists or updates an LLM provider entry, marking it as the default.
func UpdateAPIKey ¶
func UpdateAPIKey(Model types.LLMProvider, APIKey string) error
UpdateAPIKey rotates the credential for an existing provider entry.
Types ¶
type Config ¶
type Config struct {
Default types.LLMProvider `json:"default"`
LLMProviders []LLMProvider `json:"models"`
}
Config describes the on-disk structure for all saved LLM providers.
func ListSavedModels ¶
ListSavedModels loads all persisted LLM provider configurations.
type LLMProvider ¶
type LLMProvider struct {
LLM types.LLMProvider `json:"model"`
APIKey string `json:"api_key"`
}
LLMProvider represents a single stored LLM provider and its credential.
func DefaultLLMKey ¶
func DefaultLLMKey() (*LLMProvider, error)
DefaultLLMKey returns the currently selected default LLM provider, if any.
Click to show internal directories.
Click to hide internal directories.