You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm new to langserve and I've set up a chain using the chat with persistence example. https://github.com/langchain-ai/langserve/blob/main/examples/chat_with_persistence/server.py. I have the per_request_config_modifier set up to extract the authenticated user id and set it into the configurable object. i.e. config.setdefault("configurable", {})["user_name"] = authed_user.user_name
I want to pass this user_name to the LLM for generating a greeting addressed to the user (this is just a toy example for now, we'll need to pass other user-specific context to LLM or other runnables in the chain later).
How do I go about accessing configurable fields? I tried calling configurable_fields() on the chain but got errors complaining that configuration key is not found. Any pointers is appreciated. thanks!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, I'm new to langserve and I've set up a chain using the chat with persistence example. https://github.com/langchain-ai/langserve/blob/main/examples/chat_with_persistence/server.py. I have the per_request_config_modifier set up to extract the authenticated user id and set it into the configurable object. i.e.
config.setdefault("configurable", {})["user_name"] = authed_user.user_name
I want to pass this user_name to the LLM for generating a greeting addressed to the user (this is just a toy example for now, we'll need to pass other user-specific context to LLM or other runnables in the chain later).
How do I go about accessing configurable fields? I tried calling configurable_fields() on the chain but got errors complaining that configuration key is not found. Any pointers is appreciated. thanks!
Beta Was this translation helpful? Give feedback.
All reactions