export const PROVIDERS = [ "cohere", "textsynth", "openai-compat", "openai", "openai-chat", "azure", "azure-chat", "anthropic", "openrouter", ]; export type Provider = (typeof PROVIDERS)[number]; type ProviderProps = { openai: { organization: string }; "openai-chat": { organization: string }; "openai-compat": { url: string }; azure: { url: string }; "azure-chat": { url: string }; anthropic: { url: string }; openrouter: { quantization: string }; }; type SharedPresetSettings = { name: string; model: string; contextLength: number; apiKey: string; }; export type ModelPreset
= SharedPresetSettings &
(P extends keyof ProviderProps ? ProviderProps[P] : {}) & { provider: P };
export interface LoomSettings {
passageFolder: string;
defaultPassageSeparator: string;
defaultPassageFrontmatter: string;
logApiCalls: boolean;
modelPresets: ModelPreset