Fix type errors.

This commit is contained in:
Zhuoran
2024-08-20 08:44:09 +08:00
parent a3b6654cbb
commit fd26e5635d
7 changed files with 28 additions and 7 deletions

View File

@@ -52,20 +52,39 @@ type BaseModel = {
id: string;
name: string;
info?: ModelConfig;
owned_by: 'ollama' | 'openai';
};
export interface OpenAIModel extends BaseModel {
owned_by: 'openai';
external: boolean;
source?: string;
}
export interface OllamaModel extends BaseModel {
owned_by: 'ollama';
details: OllamaModelDetails;
size: number;
description: string;
model: string;
modified_at: string;
digest: string;
ollama?: {
name?: string;
model?: string;
modified_at: string;
size?: number;
digest?: string;
details?: {
parent_model?: string;
format?: string;
family?: string;
families?: string[];
parameter_size?: string;
quantization_level?: string;
};
urls?: number[];
};
}
type OllamaModelDetails = {