In this blog post, we'll build a Next.js chatbot that runs on your computer. We'll use Ollama to serve the OpenHermes 2.5 Mistral LLM (large language model) locally, the Vercel AI SDK to handle stream forwarding and rendering, and ModelFusion to inte...

Markdown supported · ⌘↵ to post
Cannot read properties of undefined (reading 'chat') 35 | raw: true, // use raw inputs and map to prompt format below 36 | })
37 | .withPromptFormat(ChatMLPromptFormat.chat());
Jonathan Gossage
Retired software developer
I am attempting to follow your tutorial without any significant Javascript experience. I am at the step where you say "Creating an API Route for the Chatbot". You say to navigate to "src/app/api/chat" but only "src/app" exists. Should the remaining directories have been created by this point or should they be created manually?