mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-08 22:21:35 +00:00
Make model selection optional, default to gpt-4o-mini on backend
Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>
This commit is contained in:
parent
fb8eaf2f7d
commit
4f63135e1d
2 changed files with 4 additions and 3 deletions
|
|
@ -177,6 +177,7 @@ async def stream_usage_ai_chat(
|
|||
data: {"type": "done"}
|
||||
data: {"type": "error", "message": "..."}
|
||||
"""
|
||||
model = model.strip() if model else ""
|
||||
model = model or DEFAULT_COMPETITOR_DISCOVERY_MODEL
|
||||
|
||||
chat_messages: List[Dict[str, Any]] = [
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ const UsageAIChatPanel: React.FC<UsageAIChatPanelProps> = ({
|
|||
};
|
||||
|
||||
const handleSend = async () => {
|
||||
if (!accessToken || !inputText.trim() || !selectedModel || isLoading) return;
|
||||
if (!accessToken || !inputText.trim() || isLoading) return;
|
||||
|
||||
const userMessage: ChatMessage = { role: "user", content: inputText.trim() };
|
||||
const updatedMessages = [...messages, userMessage];
|
||||
|
|
@ -80,7 +80,7 @@ const UsageAIChatPanel: React.FC<UsageAIChatPanelProps> = ({
|
|||
await usageAiChatStream(
|
||||
accessToken,
|
||||
updatedMessages.map((m) => ({ role: m.role, content: m.content })),
|
||||
selectedModel,
|
||||
selectedModel || "",
|
||||
(content: string) => {
|
||||
accumulated += content;
|
||||
setStreamingContent(accumulated);
|
||||
|
|
@ -243,7 +243,7 @@ const UsageAIChatPanel: React.FC<UsageAIChatPanelProps> = ({
|
|||
/>
|
||||
<Button
|
||||
onClick={handleSend}
|
||||
disabled={!inputText.trim() || !selectedModel || isLoading}
|
||||
disabled={!inputText.trim() || isLoading}
|
||||
loading={isLoading}
|
||||
>
|
||||
Send
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue