2024-04-08 19:13:45 +08:00
|
|
|
export interface IAddLlmRequestBody {
|
|
|
|
|
llm_factory: string; // Ollama
|
|
|
|
|
llm_name: string;
|
2026-05-29 17:39:41 +08:00
|
|
|
model_type: string | string[];
|
2024-04-08 19:13:45 +08:00
|
|
|
api_base?: string; // chat|embedding|speech2text|image2text
|
2026-01-05 09:53:47 +08:00
|
|
|
api_key?: string | Record<string, any>;
|
2024-11-19 14:51:33 +08:00
|
|
|
max_tokens: number;
|
2026-05-07 15:54:57 +08:00
|
|
|
is_tools?: boolean;
|
2026-06-02 19:04:20 +08:00
|
|
|
region?: string;
|
2024-04-08 19:13:45 +08:00
|
|
|
}
|
2024-05-10 10:38:39 +08:00
|
|
|
|
|
|
|
|
export interface IDeleteLlmRequestBody {
|
|
|
|
|
llm_factory: string; // Ollama
|
2024-09-24 19:10:06 +08:00
|
|
|
llm_name?: string;
|
2024-05-10 10:38:39 +08:00
|
|
|
}
|
2026-05-29 17:39:41 +08:00
|
|
|
|
|
|
|
|
export interface IListProvidersRequestParams {
|
|
|
|
|
available?: boolean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface IAddProviderRequestBody {
|
|
|
|
|
provider_name: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export type IAddProviderInstanceRequestBody = IAddLlmRequestBody & {
|
|
|
|
|
instance_name: string;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export interface IDeleteProviderInstanceRequestBody {
|
|
|
|
|
provider_name: string;
|
|
|
|
|
instances: string[];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface IShowProviderInstanceRequestParams {
|
|
|
|
|
provider_name: string;
|
|
|
|
|
instance_name: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface IAddInstanceModelRequestBody {
|
|
|
|
|
model_name: string;
|
|
|
|
|
model_type: string[];
|
|
|
|
|
max_tokens: number;
|
|
|
|
|
extra?: Record<string, any>;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface IListAllModelsRequestParams {
|
|
|
|
|
type?: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface IUpdateModelStatusRequestBody {
|
|
|
|
|
provider_name: string;
|
|
|
|
|
instance_name: string;
|
|
|
|
|
model_name: string;
|
|
|
|
|
status: 'active' | 'inactive';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface ISetDefaultModelRequestBody {
|
|
|
|
|
model_provider: string;
|
|
|
|
|
model_instance: string;
|
|
|
|
|
model_type: string;
|
|
|
|
|
model_name: string;
|
|
|
|
|
}
|