Skip to content

Commit

Permalink
Merge pull request #29 from 0xThresh/langfuse-trace-id
Browse files Browse the repository at this point in the history
Added Langfuse Session IDs for better chat tracking
  • Loading branch information
tjbck authored May 31, 2024
2 parents 9e24231 + 0c6dd82 commit cd54429
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/langfuse_filter_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

from pydantic import BaseModel
from langfuse import Langfuse
from langfuse.decorators import langfuse_context, observe


class Pipeline:
Expand Down Expand Up @@ -83,7 +82,7 @@ def set_langfuse(self):
secret_key=self.valves.secret_key,
public_key=self.valves.public_key,
host=self.valves.host,
debug=True,
debug=False,
)
self.langfuse.auth_check()

Expand All @@ -95,6 +94,7 @@ async def inlet(self, body: dict, user: Optional[dict] = None) -> dict:
input=body,
user_id=user["id"],
metadata={"name": user["name"]},
session_id=body["chat_id"]
)

print(trace.get_trace_url())
Expand Down

0 comments on commit cd54429

Please sign in to comment.