update docs

This commit is contained in:
Krrish Dholakia 2023-08-25 17:02:43 -07:00
parent 1eeac76a18
commit 198b95d7a0
3 changed files with 30 additions and 2 deletions

View file

@ -4,6 +4,15 @@ displayed_sidebar: tutorialSidebar
# Get Started
import QueryParamReader from '../src/components/queryParamReader.js'
import TokenComponent from '../src/components/queryParamToken.js'
:::info
This section assumes you've already added your API keys in <TokenComponent/>
If you want to use the non-hosted version, [go here](https://docs.litellm.ai/docs/#quick-start)
:::
```

View file

@ -0,0 +1,19 @@
import React, { useState, useEffect } from 'react';
const QueryParamToken = () => {
const [token, setToken] = useState(null);
useEffect(() => {
const urlParams = new URLSearchParams(window.location.search);
const token = urlParams.get('token');
setToken(token);
}, []);
return (
<span style={{ padding: 0, margin: 0 }}>
{token ? <a href={`https://admin.litellm.ai/${token}`} target="_blank" rel="noopener noreferrer">admin.litellm.ai</a> : ""}
</span>
);
}
export default QueryParamToken;

View file

@ -62,7 +62,7 @@ class LiteDebugger:
):
try:
litellm_data_obj = {
"status": "success",
"status": "received",
"additional_details": {"original_response": original_response},
"litellm_call_id": litellm_call_id,
"user_email": self.user_email,
@ -91,7 +91,7 @@ class LiteDebugger:
):
try:
print_verbose(
f"LiteLLMDebugger: Logging - Enters input logging function for model {model}"
f"LiteLLMDebugger: Logging - Enters handler logging function for model {model}"
)
total_cost = 0 # [TODO] implement cost tracking
response_time = (end_time - start_time).total_seconds()