Skip to content

jolfr/langchain-application-template

Repository files navigation

LangChain Application Template

Get a /chat API up and running in under 5 minutes with LangChain, FastAPI, and OpenAI.

Getting Started

Prerequisites

Usage

  1. From the terminal, run cookiecutter https://github.com/jolfr/langchain-application-template
  2. Follow on-screen prompts to configure the project. Paste in the OpenAI API key when prompted.
  3. Wait for the project to generate then cd <project_slug> into the project folder.
  4. Take a look at the README.md. It has useful commands to help you get up and running.
  5. Fire up a development server with uv run bash scripts/dev.sh
  6. Navigate to localhost:8000/docs for the Swagger documentation.
  7. Test the /chat endpoint by clicking the "Try it out" button and entering a message.

Features

  • Service definition with FastAPI
  • Preconfigured /chat endpoint
  • Basic LangChain chain using OpenAI model provider
  • Testing with pytest
  • Production builds with Docker
  • Environment management with uv

About

Cookiecutter template for LangChain applications

Resources

Stars

Watchers

Forks

Packages

No packages published