UNPKG

remix-nlux

Version:

Remix IDE NLUX integration. Remix IDE is the leading IDE for building and deploying smart contracts on Ethereum. NLUX is a JavaScript and React library for building conversational AI experiences.

14 lines (10 loc) 770 B
You can use the `createChatAdapter` function to create a LangServe adapter as shown below: ```jsx const langServeAdapter = createChatAdapter() .withUrl('https://pynlux.api.nlux.ai/pirate-speak'); ``` The `createChatAdapter` function takes will return an adapter builder that you can use to configure by chaining methods. The `withUrl(<URL>)` method is used to specify the URL of the LangServe Runnable that you want to use. You can read more about the exact format of the URL in [the reference documentation](/reference/adapters/langchain-langserve#runnable-url). In this example, we are connecting a demo API provided by _NLUX_ that runs a LangServe Runnable that translates text to pirate speak. It's based on one the examples from the LangServe documentation.