adding email based litellm debugger logs

This commit is contained in:
Krrish Dholakia 2023-08-21 07:47:03 -07:00
parent d57a1fb764
commit 582b536276
14 changed files with 8553 additions and 71 deletions

View file

@ -1,32 +0,0 @@
# Debugging UI Tutorial
LiteLLM offers a free hosted debugger UI for your api calls. Useful if you're testing your LiteLLM server and need to see if the API calls were made successfully.
You can enable this setting `lite_debugger` as a callback.
## Example Usage
```
import litellm
from litellm import embedding, completion
litellm.input_callback = ["lite_debugger"]
litellm.success_callback = ["lite_debugger"]
litellm.failure_callback = ["lite_debugger"]
litellm.set_verbose = True
user_message = "Hello, how are you?"
messages = [{ "content": user_message,"role": "user"}]
# openai call
response = completion(model="gpt-3.5-turbo", messages=[{"role": "user", "content": "Hi 👋 - i'm openai"}])
# bad request call
response = completion(model="chatgpt-test", messages=[{"role": "user", "content": "Hi 👋 - i'm a bad request"}])
```
## Requirements
## How to see the UI

View file

@ -1,21 +0,0 @@
import React from 'react';
import Layout from '@theme/Layout';
export default function Hello() {
return (
<Layout title="Hello" description="Hello React Page">
<div
style={{
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
height: '50vh',
fontSize: '20px',
}}>
<p>
Edit <code>pages/helloReact.js</code> and save to reload.
</p>
</div>
</Layout>
);
}