mirror of
https://github.com/langchain-ai/langserve.git
synced 2026-07-19 22:03:48 -04:00
Expose configurables through RemoteRunnable
#47
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Vinno97 on GitHub (Nov 23, 2023).
For local runnables, you can use
runnable.config_specsto get a list of all configurable fields. TheRemoteRunnabledoesn't expose these, even though it technically has the correct information via/config_schemaendpoint. The same can be said forInputandOutputwithinput_schemaandoutput_schema, respectively.Loading these endpoints (lazily) would enable better compatibility with applications that may rely on this. In my case, I automatically expose some of my chain's options through a UI when they're configurable. This now doesn't work when I use langserve.
@Vinno97 commented on GitHub (Nov 23, 2023):
I don't know of an elegant way to map the "annotations" field back to Python types, but this seems to work for my chains: