Skip to content

Vercel AI SDK, Next.js, LangChain, Ollama Chat Example

Notifications You must be signed in to change notification settings

brunnolou/next-ollama-app

Repository files navigation

Vercel AI SDK, Next.js, LangChain, Ollama Chat Example

This example shows how to use the Vercel AI SDK with Next.js, LangChain, and Ollama to create a ChatGPT-like AI-powered streaming chat bot.

Deploy your own

NOTE: Ollama needs to be deployed separately.

Deploy the example using Vercel:

Deploy with Vercel

How to use

Execute create-next-app with npm, Yarn, or pnpm to bootstrap the example:

npx create-next-app --example https://github.com/brunnolou/next-ollama-app
yarn create next-app --example https://github.com/brunnolou/next-ollama-app
pnpm create next-app --example https://github.com/brunnolou/next-ollama-app

To run the example locally you need to:

  1. Download Ollama and install it locally.
  2. run ollama run mistral to download and install the model locally (Requires 4.1GB and 8GB of RAM)
  3. Open http://localhost:11434 to check if Ollama is running.
  4. yarn install to install the required dependencies.
  5. yarn dev to launch the development server.

Learn More

To learn more about LangChain, OpenAI, Next.js, and the Vercel AI SDK take a look at the following resources:

About

Vercel AI SDK, Next.js, LangChain, Ollama Chat Example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published