docs(custom_pricing.md): add disclaimer on pricing in custom pricing docs

This commit is contained in:
Krrish Dholakia 2024-02-10 07:40:19 -08:00
parent 163d1d0e99
commit d1893129f7
2 changed files with 26 additions and 0 deletions

View file

@ -10,6 +10,12 @@ There's 2 ways to track cost:
By default, the response cost is accessible in the logging object via `kwargs["response_cost"]` on success (sync + async). [**Learn More**](../observability/custom_callback.md)
:::info
LiteLLM already has pricing for any model in our [model cost map](https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json).
:::
## Quick Start
Register custom pricing for sagemaker completion model.

View file

@ -179,6 +179,26 @@ export const userSpendLogsCall = async (
url = `${url}/?start_date=${startTime}&end_date=${endTime}`;
}
const response = await fetch(url, {
method: "GET",
headers: {
Authorization: `Bearer ${accessToken}`,
"Content-Type": "application/json",
},
});
if (!response.ok) {
const errorData = await response.text();
message.error(errorData);
throw new Error("Network response was not ok");
}
const data = await response.json();
console.log(data);
return data;
} catch (error) {
console.error("Failed to create key:", error);
throw error;
}
};
export const spendUsersCall = async (accessToken: String, userID: String) => {
try {