Documentation
¶
Index ¶
- Variables
- func ValidateAPIKey(provider Provider, apiKey string) error
- func ValidatePreferences(provider Provider, model string) error
- type Citation
- type DetectedEntity
- type KeyringStore
- type Note
- type PrepareRequest
- type Preview
- type PreviewExcerpt
- type Provider
- type Response
- type SecretStore
- type SendRequest
- type Service
- type Settings
Constants ¶
This section is empty.
Variables ¶
var ( ErrAPIKeyNotFound = errors.New("aucune clé API enregistrée pour ce fournisseur") )
var ( ErrEncryptedVault = errors.New("le chat n’est pas disponible pour un coffre chiffré") ErrInvalidRequest = errors.New("requête de chat invalide") ErrPreviewExpired = errors.New("l’aperçu a expiré ; préparez de nouveau la question") ErrConversationBusy = errors.New("une réponse est déjà en cours pour cette conversation") ErrConversationAbsent = errors.New("conversation introuvable") )
Functions ¶
func ValidateAPIKey ¶
func ValidatePreferences ¶
Types ¶
type DetectedEntity ¶
type KeyringStore ¶
type KeyringStore struct {
// contains filtered or unexported fields
}
func NewKeyringStore ¶
func NewKeyringStore() *KeyringStore
func (*KeyringStore) Available ¶
func (s *KeyringStore) Available() error
Available probes only the fixed NoteVault entries. A missing entry proves that the system service answered and is therefore considered available.
func (*KeyringStore) Delete ¶
func (s *KeyringStore) Delete(provider Provider) error
type PrepareRequest ¶
type Preview ¶
type Preview struct {
ID string `json:"id"`
ConversationID string `json:"conversationID"`
Provider Provider `json:"provider"`
Model string `json:"model"`
AnonymizedQuestion string `json:"anonymizedQuestion"`
OutboundText string `json:"outboundText"`
Excerpts []PreviewExcerpt `json:"excerpts"`
ExpiresAt string `json:"expiresAt"`
}
type PreviewExcerpt ¶
type SecretStore ¶
type SecretStore interface {
Available() error
Get(provider Provider) (string, error)
Set(provider Provider, apiKey string) error
Delete(provider Provider) error
}
SecretStore keeps remote provider credentials outside the vault and global configuration. Implementations must never persist secrets in ordinary files.