Merge pull request #5125 from BerriAI/ui_add_groq_models
UI add groq models
This commit is contained in:
commit
95c2f5dc2d
@ -143,7 +143,8 @@ enum Providers {
|
||||
Anthropic = "Anthropic",
|
||||
Google_AI_Studio = "Google AI Studio",
|
||||
Bedrock = "Amazon Bedrock",
|
||||
OpenAI_Compatible = "OpenAI-Compatible Endpoints (Groq, Together AI, Mistral AI, etc.)",
|
||||
Groq = "Groq",
|
||||
OpenAI_Compatible = "OpenAI-Compatible Endpoints (Together AI, Mistral AI, etc.)",
|
||||
Vertex_AI = "Vertex AI (Anthropic, Gemini, etc.)",
|
||||
Databricks = "Databricks",
|
||||
Ollama = "Ollama",
|
||||
@ -156,6 +157,7 @@ const provider_map: Record<string, string> = {
|
||||
Anthropic: "anthropic",
|
||||
Google_AI_Studio: "gemini",
|
||||
Bedrock: "bedrock",
|
||||
Groq: "groq",
|
||||
OpenAI_Compatible: "openai",
|
||||
Vertex_AI: "vertex_ai",
|
||||
Databricks: "databricks",
|
||||
@ -844,6 +846,7 @@ const ModelDashboard: React.FC<ModelDashboardProps> = ({
|
||||
modelData.data[i].provider = provider;
|
||||
modelData.data[i].input_cost = input_cost;
|
||||
modelData.data[i].output_cost = output_cost;
|
||||
modelData.data[i].litellm_model_name = litellm_model_name;
|
||||
|
||||
// Convert Cost in terms of Cost per 1M tokens
|
||||
if (modelData.data[i].input_cost) {
|
||||
@ -1381,6 +1384,16 @@ const ModelDashboard: React.FC<ModelDashboardProps> = ({
|
||||
>
|
||||
Provider
|
||||
</TableHeaderCell>
|
||||
<TableHeaderCell
|
||||
style={{
|
||||
maxWidth: "150px",
|
||||
whiteSpace: "normal",
|
||||
wordBreak: "break-word",
|
||||
fontSize: "11px",
|
||||
}}
|
||||
>
|
||||
LiteLLM Model
|
||||
</TableHeaderCell>
|
||||
{userRole === "Admin" && (
|
||||
<TableHeaderCell
|
||||
style={{
|
||||
@ -1508,6 +1521,34 @@ const ModelDashboard: React.FC<ModelDashboardProps> = ({
|
||||
>
|
||||
<p className="text-xs">{model.provider || "-"}</p>
|
||||
</TableCell>
|
||||
<TableCell
|
||||
style={{
|
||||
maxWidth: "100px",
|
||||
whiteSpace: "normal",
|
||||
wordBreak: "break-word",
|
||||
}}
|
||||
>
|
||||
<Tooltip title={model && model.litellm_model_name}>
|
||||
<pre
|
||||
style={{
|
||||
maxWidth: "150px",
|
||||
whiteSpace: "normal",
|
||||
wordBreak: "break-word",
|
||||
}}
|
||||
className="text-xs"
|
||||
title={
|
||||
model && model.litellm_model_name
|
||||
? model.litellm_model_name
|
||||
: ""
|
||||
}
|
||||
>
|
||||
{model && model.litellm_model_name
|
||||
? model.litellm_model_name.slice(0, 20) + (model.litellm_model_name.length > 20 ? "..." : "")
|
||||
: "-"}
|
||||
</pre>
|
||||
</Tooltip>
|
||||
|
||||
</TableCell>
|
||||
{userRole === "Admin" && (
|
||||
<TableCell
|
||||
style={{
|
||||
|
||||
@ -46,7 +46,8 @@ const ViewUserSpend: React.FC<ViewUserSpendProps> = ({ userID, userRole, accessT
|
||||
console.log(`userSpend: ${userSpend}`)
|
||||
let [spend, setSpend] = useState(userSpend !== null ? userSpend : 0.0);
|
||||
const [maxBudget, setMaxBudget] = useState(selectedTeam ? selectedTeam.max_budget : null);
|
||||
console.log(`maxBudget: ${maxBudget}, selectedTeam.max_budget: ${selectedTeam.max_budget}, selectedTeam: ${JSON.stringify(selectedTeam)}`)
|
||||
const team_budget = selectedTeam ? selectedTeam.max_budget : "unlimited";
|
||||
console.log(`maxBudget: ${maxBudget}, selectedTeam.max_budget: ${team_budget}, selectedTeam: ${JSON.stringify(selectedTeam)}`)
|
||||
const [userModels, setUserModels] = useState([]);
|
||||
useEffect(() => {
|
||||
const fetchData = async () => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user