fixed chat client typoes
This commit is contained in:
@@ -4,6 +4,7 @@ import ChatWindow from './components/ChatWindow';
|
||||
import InfoPanel from './components/InfoPanel';
|
||||
import { useSession } from './hooks/useSession';
|
||||
import { useChat } from './hooks/useChat';
|
||||
import { useModels } from './hooks/useModels';
|
||||
|
||||
import { DEFAULT_MODEL } from './config/constants';
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ export function streamMessage(sessionId, message, model, { onChunk, onDone, onEr
|
||||
}
|
||||
|
||||
export async function fetchModels() {
|
||||
const res = await fetch(`{BASE_URL}/models`);
|
||||
const res = await fetch(`${BASE_URL}/models`);
|
||||
if(!res.ok) throw new Error(`Failted to fetch models: ${res.status}`);
|
||||
return res.json();
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
import React from 'react';
|
||||
import { MODELS } from '../config/constants';
|
||||
|
||||
export default function InfoPanel({ isOpen, onToggle, activeSession, lastModel, lastTokenCount, selectedModel, onModelChange, models }) {
|
||||
return (
|
||||
|
||||
@@ -5,7 +5,7 @@ export const FALLBACK_MODELS = [
|
||||
{ value: 'qwen2.5-coder:14b', label: 'Qwen 2.5 Coder 14B' },
|
||||
];
|
||||
|
||||
export const DEFAULT_MODEL = MODELS[0].value;
|
||||
export const DEFAULT_MODEL = FALLBACK_MODELS[0].value;
|
||||
|
||||
export const API_DEFAULTS = {
|
||||
SESSIONS_LIMIT: 20,
|
||||
|
||||
Reference in New Issue
Block a user