Skip to content
Discussion options

You must be logged in to vote

Setting tags on the handler is not recommended if you want to use different tags dynamically for each run as you will otherwise run into concurrency issues.

You can set tags dynamically for each run via the langchain run config (docs):

from langfuse.callback import CallbackHandler
 
handler = CallbackHandler()
tags = ["tag-1", "tag-2"]
 
chain.invoke(
    {"animal": "dog"},
    config={
        "callbacks": [handler],
        "tags": tags,
    },
)

Replies: 3 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
10 replies
@RechaviaAmit
Comment options

@marcklingen
Comment options

@RechaviaAmit
Comment options

@RechaviaAmit
Comment options

@marcklingen
Comment options

Answer selected by marcklingen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment