mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
Allow configuring multiple AI providers
This commit is contained in:
8 files changed
+415
-84
No files matched your search
@@ -1,14 +1,20 @@
|
||||
import { createContext } from 'react';
|
||||
|
||||
export interface AISettings {
|
||||
export interface AIConnection {
|
||||
baseURL: string;
|
||||
apiKey: string;
|
||||
baseUrl: string;
|
||||
model: string;
|
||||
}
|
||||
|
||||
export interface AISettings {
|
||||
providers: Record<string, AIConnection>;
|
||||
}
|
||||
|
||||
export interface AISettingsContextType {
|
||||
settings: AISettings;
|
||||
updateSettings: (settings: Partial<AISettings>) => void;
|
||||
addProvider: (name: string, connection: AIConnection) => void;
|
||||
removeProvider: (name: string) => void;
|
||||
updateProvider: (name: string, connection: Partial<AIConnection>) => void;
|
||||
isConfigured: boolean;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user