More type fixes

This commit is contained in:
eduardruzga
2024-11-14 14:29:47 +02:00
parent b0754e546b
commit df91d0edc0
6 changed files with 24 additions and 14 deletions

View File

@@ -1,4 +1,4 @@
import type { ModelInfo, OllamaApiResponse, OllamaModel } from './types';
import type { ModelInfo, OllamaApiResponse, OllamaModel, ProviderInfo } from './types';
export const WORK_DIR_NAME = 'project';
export const WORK_DIR = `/home/${WORK_DIR_NAME}`;
@@ -7,16 +7,6 @@ export const MODEL_REGEX = /^\[Model: (.*?)\]\n\n/;
export const PROVIDER_REGEX = /\[Provider: (.*?)\]\n\n/;
export const DEFAULT_MODEL = 'claude-3-5-sonnet-latest';
export type ProviderInfo = {
staticModels: ModelInfo[],
name: string,
getDynamicModels?: () => Promise<ModelInfo[]>,
getApiKeyLink?: string,
labelForGetApiKey?: string,
icon?:string,
};
const PROVIDER_LIST: ProviderInfo[] = [
{
name: 'Anthropic',

View File

@@ -26,3 +26,12 @@ export interface ModelInfo {
label: string;
provider: string;
}
export interface ProviderInfo {
staticModels: ModelInfo[],
name: string,
getDynamicModels?: () => Promise<ModelInfo[]>,
getApiKeyLink?: string,
labelForGetApiKey?: string,
icon?:string,
};