Dynamically change langsmith project (LANGCHAIN_PROJECT value) #2381
Unanswered
Mohamed-AtiaB
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a graph that I use in 2 places in my API. (note that the graph has many nodes and edges)
problem is, when calling through my-api1 i want to log to LangSmith project1
and when calling through my-api2 I want to log to LangSmith project2.
i cannot apply @Traceable decorator because the same methods/nodes are used in 2 places.
is there another way to invoke my graph and instructing it to write so a specific langsmith project?
os.environ["LANGCHAIN_PROJECT"] = appConfig.langchain_project covers point 1.
I read about RunTrees, but i couldn't pass the config object as a parameter.
config = {
"run_id": request.thread_id,
"recursion_limit": 150,
"configurable": {
"thread_id": str(uuid.uuid4()),
"checkpoint_ns": ""
},
}
Beta Was this translation helpful? Give feedback.
All reactions