Dynamically change langsmith project (LANGCHAIN_PROJECT value) #2381
Answered
by
hinthornw
Mohamed-AtiaB
asked this question in
Q&A
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
efriis
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
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