mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
ui fix
This commit is contained in:
parent
5aca737650
commit
9e46d7354d
1 changed files with 51 additions and 40 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { CodeOutlined, PlayCircleOutlined } from "@ant-design/icons";
|
||||
import { Alert, Button, Card, Input, Space, Typography } from "antd";
|
||||
import { Alert, Button, Card, Input, Space, Tabs, Typography } from "antd";
|
||||
import ModelSelector from "@/components/common_components/ModelSelector";
|
||||
import { TestResult } from "./semanticFilterTestUtils";
|
||||
|
||||
|
|
@ -33,9 +33,15 @@ export default function MCPSemanticFilterTestPanel({
|
|||
curlCommand,
|
||||
}: MCPSemanticFilterTestPanelProps) {
|
||||
return (
|
||||
<>
|
||||
<Card title="Test Configuration" style={{ marginBottom: 16 }}>
|
||||
<Space direction="vertical" style={{ width: "100%" }} size="large">
|
||||
<Card title="Test Configuration" style={{ marginBottom: 16 }}>
|
||||
<Tabs
|
||||
defaultActiveKey="test"
|
||||
items={[
|
||||
{
|
||||
key: "test",
|
||||
label: "Test",
|
||||
children: (
|
||||
<Space direction="vertical" style={{ width: "100%" }} size="large">
|
||||
<div>
|
||||
<Typography.Text strong style={{ display: "block", marginBottom: 8 }}>
|
||||
<PlayCircleOutlined /> Test Query
|
||||
|
|
@ -104,41 +110,46 @@ export default function MCPSemanticFilterTestPanel({
|
|||
</div>
|
||||
</div>
|
||||
)}
|
||||
</Space>
|
||||
</Card>
|
||||
|
||||
<Card
|
||||
title={
|
||||
<Space>
|
||||
<CodeOutlined />
|
||||
<Typography.Text>API Usage</Typography.Text>
|
||||
</Space>
|
||||
}
|
||||
>
|
||||
<Typography.Text type="secondary" style={{ display: "block", marginBottom: 12 }}>
|
||||
Use this curl command to test the semantic filter with your current configuration.
|
||||
</Typography.Text>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => setShowCurl(!showCurl)}
|
||||
style={{ padding: 0, marginBottom: 12 }}
|
||||
>
|
||||
{showCurl ? "Hide" : "Show"} curl command
|
||||
</Button>
|
||||
{showCurl && (
|
||||
<pre
|
||||
style={{
|
||||
background: "#f5f5f5",
|
||||
padding: 12,
|
||||
borderRadius: 4,
|
||||
overflow: "auto",
|
||||
fontSize: 12,
|
||||
}}
|
||||
>
|
||||
{curlCommand}
|
||||
</pre>
|
||||
)}
|
||||
</Card>
|
||||
</>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
{
|
||||
key: "api",
|
||||
label: "API Usage",
|
||||
children: (
|
||||
<div>
|
||||
<Space style={{ marginBottom: 8 }}>
|
||||
<CodeOutlined />
|
||||
<Typography.Text strong>API Usage</Typography.Text>
|
||||
</Space>
|
||||
<Typography.Text type="secondary" style={{ display: "block", marginBottom: 8 }}>
|
||||
Use this curl command to test the semantic filter with your current configuration.
|
||||
</Typography.Text>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => setShowCurl(!showCurl)}
|
||||
style={{ padding: 0, marginBottom: 12 }}
|
||||
>
|
||||
{showCurl ? "Hide" : "Show"} curl command
|
||||
</Button>
|
||||
{showCurl && (
|
||||
<pre
|
||||
style={{
|
||||
background: "#f5f5f5",
|
||||
padding: 12,
|
||||
borderRadius: 4,
|
||||
overflow: "auto",
|
||||
fontSize: 12,
|
||||
}}
|
||||
>
|
||||
{curlCommand}
|
||||
</pre>
|
||||
)}
|
||||
</div>
|
||||
),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue