---
title: "Discussion on \"Create Your Own Local Chatbot with Next.js, Ollama, and ModelFusion\" | Hashnode"
description: "Discussion on \"Create Your Own Local Chatbot with Next.js, Ollama, and ModelFusion\". 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..."
url: "https://hashnode.com/posts/create-your-own-local-chatbot-with-nextjs-ollama-and-modelfusion/6575731991393ae5650903dd"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Create Your Own Local Chatbot with Next.js, Ollama, and ModelFusion](https://p42.hashnode.dev/create-your-own-local-chatbot-with-nextjs-ollama-and-modelfusion?utm_source=hashnode&utm_medium=feed)

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...

Dec 10, 2023 · 7 min read · p42.hashnode.dev  
Updated Jan 13, 2024  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#nextjs](https://hashnode.com/tag/nextjs)
-   [#ollama](https://hashnode.com/tag/ollama)
-   [#chatbot](https://hashnode.com/tag/chatbot)

## Written by

[Lars Grammel](https://hashnode.com/@lgrammel)

@lgrammel

  
[View profile](https://hashnode.com/@lgrammel)

Developing refactoring tools for TypeScript and JavaScript. Founder of p42.ai

## Responses 2

Markdown supported · ⌘↵ to post

[Jonathan Gossage](https://hashnode.com/@JonathanGossage)

[Dec 14, 2023](https://hashnode.com/posts/create-your-own-local-chatbot-with-nextjs-ollama-and-modelfusion/6575731991393ae5650903dd/comment/657b369ad69ca11ab786adc3)

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?

[Hamza Soomro](https://hashnode.com/@HamzaQadir)

[Dec 12, 2023](https://hashnode.com/posts/create-your-own-local-chatbot-with-nextjs-ollama-and-modelfusion/6575731991393ae5650903dd/comment/65780d64c8238031e0982f13)

Cannot read properties of undefined (reading 'chat') 35 | raw: true, // use raw inputs and map to prompt format below 36 | })

> 37 | .withPromptFormat(ChatMLPromptFormat.chat());

[Lars Grammel](https://hashnode.com/@lgrammel)

[Dec 12, 2023](https://hashnode.com/posts/create-your-own-local-chatbot-with-nextjs-ollama-and-modelfusion/6575731991393ae5650903dd/comment/65780d64c8238031e0982f13#reply-65781d4ea7af0fb6a9fcf8f9)

Thank you - I've updated that part, it was outdated.
