mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 19:54:13 +00:00
ui - show supported openai params
This commit is contained in:
parent
245990597e
commit
408130619b
1 changed files with 21 additions and 2 deletions
|
@ -32,6 +32,7 @@ interface ModelInfo {
|
|||
supports_vision: boolean;
|
||||
max_input_tokens?: number;
|
||||
max_output_tokens?: number;
|
||||
supported_openai_params?: string[];
|
||||
|
||||
// Add other properties if needed
|
||||
|
||||
|
@ -193,6 +194,7 @@ const ModelHub: React.FC<ModelHubProps> = ({
|
|||
<Text>Supports Vision: {model?.supports_vision == true ? "Yes" : "No"}</Text>
|
||||
<Text>Max Input Tokens: {model?.max_input_tokens ? model?.max_input_tokens : "N/A"}</Text>
|
||||
<Text>Max Output Tokens: {model?.max_output_tokens ? model?.max_output_tokens : "N/A"}</Text>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -218,7 +220,7 @@ const ModelHub: React.FC<ModelHubProps> = ({
|
|||
|
||||
<Modal
|
||||
|
||||
title="Model Usage"
|
||||
title={selectedModel && selectedModel.model_group ? selectedModel.model_group : "Unknown Model"}
|
||||
width={800}
|
||||
|
||||
visible={isModalVisible}
|
||||
|
@ -234,11 +236,12 @@ const ModelHub: React.FC<ModelHubProps> = ({
|
|||
|
||||
<div>
|
||||
|
||||
<p><strong>Model Name:</strong> {selectedModel.model_group}</p>
|
||||
<p className='mb-4'><strong>Model Information & Usage:</strong> {selectedModel.model_group}</p>
|
||||
|
||||
<TabGroup>
|
||||
<TabList>
|
||||
<Tab>OpenAI Python SDK</Tab>
|
||||
<Tab>Supported OpenAI Params</Tab>
|
||||
<Tab>LlamaIndex</Tab>
|
||||
<Tab>Langchain Py</Tab>
|
||||
</TabList>
|
||||
|
@ -265,6 +268,22 @@ response = client.chat.completions.create(
|
|||
print(response)
|
||||
`}
|
||||
</SyntaxHighlighter>
|
||||
</TabPanel>
|
||||
<TabPanel>
|
||||
|
||||
|
||||
{
|
||||
selectedModel?.supported_openai_params?.map((param) => (
|
||||
|
||||
<pre>
|
||||
{param}
|
||||
</pre>
|
||||
|
||||
|
||||
))
|
||||
}
|
||||
|
||||
|
||||
</TabPanel>
|
||||
<TabPanel>
|
||||
<SyntaxHighlighter language="python">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue