Skip to content

Commit

Permalink
fix推理适用的url
Browse files Browse the repository at this point in the history
  • Loading branch information
guochenshu committed Jan 7, 2025
1 parent 845e5b7 commit d0ca4a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ui/src/pages/Playground/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { useIntl } from '@umijs/max';

interface PlaygroundModel {
model_name: string;
chat_url: string;
url: string;
base_url: string;
}

Expand All @@ -27,7 +27,7 @@ const Playground: React.FC = () => {
setModels(response.data || []);
if (response.data?.length > 0) {
setSelectedModel(response.data[0].model_name);
setChatUrl(response.data[0].chat_url);
setChatUrl(response.data[0].url);
}
} catch (error) {
console.error('Failed to fetch models:', error);
Expand All @@ -41,7 +41,7 @@ const Playground: React.FC = () => {
const handleModelChange = (value: string) => {
setSelectedModel(value);
const selectedModelData = models.find(m => m.model_name === value);
setChatUrl(selectedModelData?.chat_url);
setChatUrl(selectedModelData?.url);
};

const sampleCode = `from openai import OpenAI
Expand Down

0 comments on commit d0ca4a8

Please sign in to comment.