Created
February 22, 2025 04:28
-
-
Save achinta/fc0f4c82ff2bd47856a7db8380b1e9fc to your computer and use it in GitHub Desktop.
Create Langfuse span manually
This file contains hidden or 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
from langfuse.callback import CallbackHandler | |
from langfuse import Langfuse | |
callback_handler = CallbackHandler() | |
langfuse = Langfuse() | |
span = langfuse.span(trace_id=trace_id, input=openai_messages, name=trace_span_name) | |
response = [] # LLM call here and get response | |
span.end(output=response) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment