bolt.diy/app/types/model.ts

25 lines
557 B
TypeScript
Raw Normal View History

2024-11-14 12:29:47 +00:00
import type { ModelInfo } from '~/utils/types';
export type ProviderInfo = {
2024-11-21 21:05:35 +00:00
staticModels: ModelInfo[];
name: string;
2024-12-18 11:04:18 +00:00
getDynamicModels?: (
2024-12-18 14:34:43 +00:00
providerName: string,
2024-12-18 11:04:18 +00:00
apiKeys?: Record<string, string>,
providerSettings?: IProviderSetting,
serverEnv?: Record<string, string>,
) => Promise<ModelInfo[]>;
2024-11-21 21:05:35 +00:00
getApiKeyLink?: string;
labelForGetApiKey?: string;
icon?: string;
2024-12-11 08:32:21 +00:00
};
export interface IProviderSetting {
enabled?: boolean;
baseUrl?: string;
}
export type IProviderConfig = ProviderInfo & {
settings: IProviderSetting;
2024-11-14 12:29:47 +00:00
};