let the ollama models be auto generated from ollama api

This commit is contained in:
yunat
2024-10-18 14:34:08 +03:00
parent 4f7a06f56a
commit 0d777637ff
6 changed files with 94 additions and 35 deletions

28
app/utils/types.ts Normal file
View File

@@ -0,0 +1,28 @@
interface OllamaModelDetails {
parent_model: string;
format: string;
family: string;
families: string[];
parameter_size: string;
quantization_level: string;
}
interface OllamaModel {
name: string;
model: string;
modified_at: string;
size: number;
digest: string;
details: OllamaModelDetails;
}
export interface OllamaApiResponse {
models: OllamaModel[];
}
export interface ModelInfo {
name: string;
label: string;
provider: string;
}