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.

17 lines (14 loc) 701 B
You can use the `useUnsafeChatAdapter` hook to create an OpenAI adapter.<br /> You can optionally import `ChatAdapterOptions` from `@nlux/openai-react` to define the type of the options object. ```tsx const adapterOptions: ChatAdapterOptions = { apiKey: 'your-openai-api-key-here', model: 'gpt-3.5-turbo', systemMessage: 'Act as a helpful assistant and be funny and engaging.', }; export const App = () => { const openAiAdapter = useUnsafeChatAdapter(adapterOptions); } ``` The `useUnsafeChatAdapter` hook takes config parameters and returns an adapter object. Please refer to the [reference documentation](/reference/adapters/open-ai) for more information on the available options.