chore: v1 to v2

This commit is contained in:
jialin
2025-11-20 17:31:15 +08:00
parent ea39a45f31
commit 551f04011a
12 changed files with 40 additions and 55 deletions
@@ -2,7 +2,7 @@ import AutoTooltip from '@/components/auto-tooltip';
import CopyButton from '@/components/copy-button';
import IconFont from '@/components/icon-font';
import ScrollerModal from '@/components/scroller-modal';
import { GPUSTACK_API_BASE_URL } from '@/config/settings';
import { OPENAI_COMPATIBLE } from '@/config/settings';
import {
AUDIO_SPEECH_TO_TEXT_API,
AUDIO_TEXT_TO_SPEECH_API,
@@ -23,8 +23,6 @@ import { modelCategoriesMap } from '../config';
import { ListItem } from '../config/types';
import useGenericProxy from '../hooks/use-generic-proxy';
const GPUSTACK_API = GPUSTACK_API_BASE_URL;
const API_MAP: Record<string, { api: string }> = {
[modelCategoriesMap.embedding]: {
api: EMBEDDING_API
@@ -112,7 +110,7 @@ const ApiAccessInfo = ({ open, data, onClose }: ApiAccessInfoProps) => {
const endPoint = useMemo(() => {
if (!data.generic_proxy) {
return `${window.location.origin}/${GPUSTACK_API}`;
return `${window.location.origin}/${OPENAI_COMPATIBLE}`;
}
return `${window.location.origin}${MODEL_PROXY}/<YOUR_API_PATH>`;
}, [data]);
+6 -3
View File
@@ -454,9 +454,12 @@ const DataForm: React.FC<DataFormProps> = forwardRef((props, ref) => {
enabled: false,
algorithm: '',
draft_model: null,
num_draft_tokens: 4,
ngram_min_match_length: 1,
ngram_max_match_length: 10
num_draft_tokens:
initialValues?.speculative_config?.num_draft_tokens || 4,
ngram_min_match_length:
initialValues?.speculative_config?.ngram_min_match_length || 1,
ngram_max_match_length:
initialValues?.speculative_config?.ngram_max_match_length || 10
},
...initialValues
}}