mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-27 08:20:13 +00:00
ui fix - load litellm model list
This commit is contained in:
@@ -12,11 +12,19 @@ export interface Model {
|
||||
model_info: Object | null;
|
||||
}
|
||||
|
||||
export const modelCostMap = async () => {
|
||||
export const modelCostMap = async (
|
||||
accessToken: string,
|
||||
) => {
|
||||
try {
|
||||
const url = proxyBaseUrl ? `${proxyBaseUrl}/get/litellm_model_cost_map` : `/get/litellm_model_cost_map`;
|
||||
const response = await fetch(
|
||||
url
|
||||
url, {
|
||||
method: "GET",
|
||||
headers: {
|
||||
Authorization: `Bearer ${accessToken}`,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
}
|
||||
);
|
||||
const jsonData = await response.json();
|
||||
console.log(`received litellm model cost data: ${jsonData}`);
|
||||
|
||||
Reference in New Issue
Block a user