mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 12:55:19 +00:00
refac
This commit is contained in:
parent
30d1dc2c60
commit
474df5e534
2 changed files with 7 additions and 7 deletions
|
|
@ -74,8 +74,8 @@
|
||||||
{
|
{
|
||||||
url,
|
url,
|
||||||
key,
|
key,
|
||||||
auth_type,
|
|
||||||
config: {
|
config: {
|
||||||
|
auth_type,
|
||||||
azure: azure,
|
azure: azure,
|
||||||
api_version: apiVersion
|
api_version: apiVersion
|
||||||
}
|
}
|
||||||
|
|
@ -142,13 +142,13 @@
|
||||||
const connection = {
|
const connection = {
|
||||||
url,
|
url,
|
||||||
key,
|
key,
|
||||||
auth_type,
|
|
||||||
config: {
|
config: {
|
||||||
enable: enable,
|
enable: enable,
|
||||||
tags: tags,
|
tags: tags,
|
||||||
prefix_id: prefixId,
|
prefix_id: prefixId,
|
||||||
model_ids: modelIds,
|
model_ids: modelIds,
|
||||||
connection_type: connectionType,
|
connection_type: connectionType,
|
||||||
|
auth_type,
|
||||||
...(!ollama && azure ? { azure: true, api_version: apiVersion } : {})
|
...(!ollama && azure ? { azure: true, api_version: apiVersion } : {})
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -171,7 +171,7 @@
|
||||||
url = connection.url;
|
url = connection.url;
|
||||||
key = connection.key;
|
key = connection.key;
|
||||||
|
|
||||||
auth_type = connection.auth_type ?? 'bearer';
|
auth_type = connection.config.auth_type ?? 'bearer';
|
||||||
|
|
||||||
enable = connection.config?.enable ?? true;
|
enable = connection.config?.enable ?? true;
|
||||||
tags = connection.config?.tags ?? [];
|
tags = connection.config?.tags ?? [];
|
||||||
|
|
|
||||||
|
|
@ -261,10 +261,10 @@
|
||||||
<div class="flex flex-col gap-1.5 mt-1.5">
|
<div class="flex flex-col gap-1.5 mt-1.5">
|
||||||
{#each OPENAI_API_BASE_URLS as url, idx}
|
{#each OPENAI_API_BASE_URLS as url, idx}
|
||||||
<OpenAIConnection
|
<OpenAIConnection
|
||||||
pipeline={pipelineUrls[url] ? true : false}
|
{url}
|
||||||
bind:url
|
key={OPENAI_API_KEYS[idx]}
|
||||||
bind:key={OPENAI_API_KEYS[idx]}
|
|
||||||
bind:config={OPENAI_API_CONFIGS[idx]}
|
bind:config={OPENAI_API_CONFIGS[idx]}
|
||||||
|
pipeline={pipelineUrls[url] ? true : false}
|
||||||
onSubmit={() => {
|
onSubmit={() => {
|
||||||
updateOpenAIHandler();
|
updateOpenAIHandler();
|
||||||
}}
|
}}
|
||||||
|
|
@ -326,7 +326,7 @@
|
||||||
<div class="flex-1 flex flex-col gap-1.5 mt-1.5">
|
<div class="flex-1 flex flex-col gap-1.5 mt-1.5">
|
||||||
{#each OLLAMA_BASE_URLS as url, idx}
|
{#each OLLAMA_BASE_URLS as url, idx}
|
||||||
<OllamaConnection
|
<OllamaConnection
|
||||||
bind:url
|
{url}
|
||||||
bind:config={OLLAMA_API_CONFIGS[idx]}
|
bind:config={OLLAMA_API_CONFIGS[idx]}
|
||||||
{idx}
|
{idx}
|
||||||
onSubmit={() => {
|
onSubmit={() => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue