text stringlengths 0 3.02k |
|---|
https://litellm.vercel.app/docs/observability/langfuse_integration |
Langfuse - Logging LLM Input/Output | liteLLM |
LangFuse is open Source Observability & Analytics for LLM Apps |
{Reactions} |
💪 |
[3/16/2024 4:13 PM] joe.young.security |
How to implement it is on that page you linked. |
[3/16/2024 4:13 PM] joe.young.security |
at the bottom is all the code for doing so. |
{Reactions} |
👍 |
[3/16/2024 4:14 PM] mr.headsh0t |
So just modifiying the backend/apps/litellm/main.py file and make it point either to my local server of Langfuse or toward their cloud with an API key... that's it? |
@wildtangn:3t does this make sense? |
[3/16/2024 4:15 PM] joe.young.security |
I haven't looked at any of the LiteLLM code, but that's what I where I would start looking. |
[3/16/2024 4:16 PM] jannikstdl |
The Database itself is SQLite |
{Reactions} |
👀 |
[3/16/2024 4:16 PM] joe.young.security |
You could make a copy of the SQLite db then and work on that. |
[3/16/2024 4:17 PM] mr.headsh0t |
But still I feel that the entry in the database are removed when erased by the user right? |
[3/16/2024 4:17 PM] joe.young.security |
I used to do that for large replicated MySQL clusters when they were in production. |
[3/16/2024 4:18 PM] joe.young.security |
Yeah, that is what it sounds like to me too |
[3/16/2024 4:18 PM] joe.young.security |
It sounds like you want an audit log of all prompts and chat interactions, even if they were deleted. |
[3/16/2024 4:19 PM] mr.headsh0t |
Yeah exactly, we are about to test the implementation for a pool of user in our company. The CTO is asking to be able to see the usage of the service |
[3/16/2024 4:19 PM] mr.headsh0t |
See if people are actually using it |
[3/16/2024 4:20 PM] joe.young.security |
Using it and tracking every chat interaction is different though. |
[3/16/2024 4:20 PM] joe.young.security |
You can see if it's being used, but auditing every chat interaction is more complex. |
[3/16/2024 4:20 PM] joe.young.security |
Both can be done though |
[3/16/2024 4:21 PM] joe.young.security |
If I was you, and the CTO only wants to see that it's being accessed and used, then monitoring the IPs that connect via the Docker log is adequate. |
[3/16/2024 4:21 PM] joe.young.security |
If the CTO wants to know exactly what they are talking about, that's more complicated and needs a bit more work. |
[3/16/2024 4:22 PM] jannikstdl |
@Michel.K I have exactly the same in mind setting up logging. I also have tried to catch the requests in JSON in timen where we didn’t support LiteLLM. But then you basically fetch the database all the time. I think the best solution is to add a logger supported by LiteLLM like https://litellm.vercel.app/docs/observab... |
{Embed} |
https://litellm.vercel.app/docs/observability/llmonitor_integration |
LLMonitor Tutorial | liteLLM |
LLMonitor is an open-source observability platform that provides cost tracking, user tracking and powerful agent tracing. |
[3/16/2024 4:23 PM] joe.young.security |
You could monitor the streams sent back and forth and grab the "contents" like how I found the sources and references were generated by the LLM and being displayed in the metadatas. You could add code to send the response to the user and to a separate SQLite DB |
[3/16/2024 4:23 PM] joe.young.security |
There's a lot ways you can do it. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.