nlux icon indicating copy to clipboard operation
nlux copied to clipboard

LangServe adapter with Configurable

Open jlev opened this issue 1 year ago β€’ 1 comments

I'm now trying to set some configurable options on my LangServe chains, but it looks like I can only set input keys with inputPreprocessor.

Is there a way to override the getRequestBody method to send additional options alongside the input?

jlev avatar Apr 30 '24 17:04 jlev

I was able to figure out how to pass the data I need in the request headers, but this might still be a useful option for other use cases. Eg https://github.com/langchain-ai/langserve/blob/main/examples/configurable_agent_executor/server.py

jlev avatar Apr 30 '24 21:04 jlev

Hi @jlev β€”Β New LangServe config added here: https://docs.nlkit.com/nlux/reference/adapters/langchain-langserve#langserve-config

The config present there will go into the request body. Does this satisfy your requirement ?

salmenus avatar Jun 01 '24 16:06 salmenus

Closing this as feature was delivered, and documented β€” and no further requirements were mentioned.

salmenus avatar Jun 07 '24 18:06 salmenus