Example code for an app that makes use of Langchains OpenAIChat. The stream is managed by a CallbackManager. And the prompt is a basic HumanChatMessage.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx
. The page auto-updates as you edit the file.
Check out our Next.js deployment documentation for more details.