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

An example of how to set context with custom batch adapter #95

Open MichaelHefetz opened 1 week ago

MichaelHefetz commented 1 week ago

Is it possible to provide a sample how to use the context with custom batch adapter? I had no success to understand how it is used in the context aware demo app.

I need something very basic: For each instance of chat I need to create a session id so I can send it to the custom server for my custom batch adapter (in the send method)

Am I missing something and it is a simple task?

Thank you

salmenus commented 1 week ago

Good call. Right now we have the Context-Aware Conversations demo, which uses context and adapters. https://github.com/nlkitai/demos/tree/latest/context-aware-conversations

We will document the feature on docs website as well. Thanks for suggesting.

MichaelHefetz commented 1 week ago

Yes, I have tried to understand what is going on there ...but without success...it is much more complicated than I need. It needs an extra library to be installed All I need is to have session id per chat instance. Thank you