Unverified Commit 67a5020c authored by Timothy Jaeryang Baek's avatar Timothy Jaeryang Baek Committed by GitHub
Browse files

Merge pull request #2505 from open-webui/dev-models

feat: openai api compatible model presets (profiles/modelfiles)
parents d0d76e2a a6af20e1
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
import { APP_NAME } from '$lib/constants'; import { APP_NAME } from '$lib/constants';
import { type Writable, writable } from 'svelte/store'; import { type Writable, writable } from 'svelte/store';
import type { GlobalModelConfig, ModelConfig } from '$lib/apis';
// Backend // Backend
export const WEBUI_NAME = writable(APP_NAME); export const WEBUI_NAME = writable(APP_NAME);
...@@ -42,27 +43,27 @@ export const showSettings = writable(false); ...@@ -42,27 +43,27 @@ export const showSettings = writable(false);
export const showArchivedChats = writable(false); export const showArchivedChats = writable(false);
export const showChangelog = writable(false); export const showChangelog = writable(false);
type Model = OpenAIModel | OllamaModel; export type Model = OpenAIModel | OllamaModel;
type OpenAIModel = { type BaseModel = {
id: string; id: string;
name: string; name: string;
external: boolean; info?: ModelConfig;
source?: string;
}; };
type OllamaModel = { export interface OpenAIModel extends BaseModel {
id: string; external: boolean;
name: string; source?: string;
}
// Ollama specific fields export interface OllamaModel extends BaseModel {
details: OllamaModelDetails; details: OllamaModelDetails;
size: number; size: number;
description: string; description: string;
model: string; model: string;
modified_at: string; modified_at: string;
digest: string; digest: string;
}; }
type OllamaModelDetails = { type OllamaModelDetails = {
parent_model: string; parent_model: string;
...@@ -133,6 +134,7 @@ type Config = { ...@@ -133,6 +134,7 @@ type Config = {
default_models?: string[]; default_models?: string[];
default_prompt_suggestions?: PromptSuggestion[]; default_prompt_suggestions?: PromptSuggestion[];
trusted_header_auth?: boolean; trusted_header_auth?: boolean;
model_config?: GlobalModelConfig;
}; };
type PromptSuggestion = { type PromptSuggestion = {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment