Closed camba1 closed 4 months ago
Hi @camba1 - are you using RemoteRunnable
? If so, you can pass in metadata the same way as you would here!
Oh, ok. So the client would be in charge of setting the correct metadata. Something like this:
chain = RemoteRunnable("http://127.0.0.1:8000/simple/")
config = {"metadata": {"conversation_id": str(uuid.uuid4())}}
result = chain.invoke({"input": "Hello"}, config=config)
Cool. Thanks!
This does not work for me. I get multiple traces. One which contains the run but without the metadata. And another that contains just the metadata but without the run.
facing the same issue. using metadata
or configurable
config does not work
Issue with current documentation:
The documentation indicates how to setup thread in LangChain using the SDK (https://docs.smith.langchain.com/monitoring/faq/threads)
But how do you accomplish the same thing if the application is running in LangServe? My understanding is that you pass the chain to LangServe and it is LangServe that runs it when a request comes in. So, where would you add the thread configuration?
Idea or request for content:
Add another tab to the section where it explains how to set this up in python and LangChain Python with an example on how to accomplish this on LangServe.