Merge remote-tracking branch 'upstream/dev' into feat/backend-web-search

This commit is contained in:
Jun Siang Cheah
2024-05-25 14:49:49 +01:00
89 changed files with 3702 additions and 3791 deletions

View File

@@ -1,5 +1,6 @@
import { APP_NAME } from '$lib/constants';
import { type Writable, writable } from 'svelte/store';
import type { GlobalModelConfig, ModelConfig } from '$lib/apis';
// Backend
export const WEBUI_NAME = writable(APP_NAME);
@@ -44,25 +45,25 @@ export const showChangelog = writable(false);
export type Model = OpenAIModel | OllamaModel;
type OpenAIModel = {
type BaseModel = {
id: string;
name: string;
external: boolean;
source?: string;
info?: ModelConfig;
};
type OllamaModel = {
id: string;
name: string;
export interface OpenAIModel extends BaseModel {
external: boolean;
source?: string;
}
// Ollama specific fields
export interface OllamaModel extends BaseModel {
details: OllamaModelDetails;
size: number;
description: string;
model: string;
modified_at: string;
digest: string;
};
}
type OllamaModelDetails = {
parent_model: string;
@@ -133,6 +134,7 @@ type Config = {
default_models?: string[];
default_prompt_suggestions?: PromptSuggestion[];
trusted_header_auth?: boolean;
model_config?: GlobalModelConfig;
websearch?: boolean;
};