nlkitai / nlux

The π—£π—Όπ˜„π—²π—Ώπ—³π˜‚π—Ή Conversational AI JavaScript Library πŸ’¬ β€”Β UI for any LLM, supporting LangChain / HuggingFace / Vercel AI, and more 🧑 React, Next.js, and plain JavaScript ⭐️
https://docs.nlkit.com/nlux
Other
937 stars 48 forks source link

LangServe adapter with Configurable #59

Closed jlev closed 3 weeks ago

jlev commented 2 months ago

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 commented 2 months ago

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

salmenus commented 1 month ago

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 commented 3 weeks ago

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