forked from BerriAI/litellm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
172 changed files
with
206,752 additions
and
6,511 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
docs/my-website/docs/observability/raw_request_response.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import Image from '@theme/IdealImage'; | ||
|
||
# Raw Request/Response Logging | ||
|
||
See the raw request/response sent by LiteLLM in your logging provider (OTEL/Langfuse/etc.). | ||
|
||
**on SDK** | ||
```python | ||
# pip install langfuse | ||
import litellm | ||
import os | ||
|
||
# log raw request/response | ||
litellm.log_raw_request_response = True | ||
|
||
# from https://cloud.langfuse.com/ | ||
os.environ["LANGFUSE_PUBLIC_KEY"] = "" | ||
os.environ["LANGFUSE_SECRET_KEY"] = "" | ||
# Optional, defaults to https://cloud.langfuse.com | ||
os.environ["LANGFUSE_HOST"] # optional | ||
|
||
# LLM API Keys | ||
os.environ['OPENAI_API_KEY']="" | ||
|
||
# set langfuse as a callback, litellm will send the data to langfuse | ||
litellm.success_callback = ["langfuse"] | ||
|
||
# openai call | ||
response = litellm.completion( | ||
model="gpt-3.5-turbo", | ||
messages=[ | ||
{"role": "user", "content": "Hi 👋 - i'm openai"} | ||
] | ||
) | ||
``` | ||
|
||
**on Proxy** | ||
|
||
```yaml | ||
litellm_settings: | ||
log_raw_request_response: True | ||
``` | ||
**Expected Log** | ||
<Image img={require('../../img/raw_request_log.png')}/> |
2 changes: 2 additions & 0 deletions
2
...jects/llmcord.py (Discord LLM Chatbot).md → docs/my-website/docs/projects/llm_cord.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# llmcord.py | ||
|
||
llmcord.py lets you and your friends chat with LLMs directly in your Discord server. It works with practically any LLM, remote or locally hosted. | ||
|
||
Github: https://github.com/jakobdylanc/discord-llm-chatbot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.