Skip to content

chrisleekr/langchain-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A LangChain playground using TypeScript

A playground for LangChain.js, LangGraph, and other LLM-related tools.

This project provides both REST API endpoints or Slack bot integration for interacting with different language models and LangChain and LangGraph workflows.

How to start

docker-compose up -d --build

Architecture

Core components

  • langchain.js: Framework for building applications with LLMs.
  • langgraph: Framework for building applications with advanced workflow orchestration for multi-step processes.
  • slack/bolt: Integration with Slack for building Slack apps.

LLM providers

Services

  • ollama: Ollama enables the execution of LLM models locally.
  • openweb-ui: OpenWeb UI is a self-hosted WebUI that interacts with Ollama.
  • unstructured-api: The Unstructured API is designed to ingest/digest files of various types and sizes.
  • qdrant: Qdrant serves as a vector database.
  • chroma: Chroma serves as an embedding database. Not used anymore.
  • redis: Redis is an open-source in-memory data structure store.

Server mode

  • fastify: serves as a web server in src/api
  • slack: serves as a Slack app in src/slack

Slack integration

In this project, I used slack/bolt and LangGraph to build a Slack app.

  • When a user mentions the bot in a channel, the bot will respond with a message.
  • It will execute the following steps:
    • Intent classifier: Classify the intent of the user's message.
    • Intent router: Route the user's message to the appropriate node.
    • Get message history: Get the message history of the channel.
    • Summarise thread: Summarise the thread.
    • Translate message: Translate the message to the user's language.
    • Find information: Find information from the RAG database.
    • General response: Generate a general response.
    • Final response: Respond to the user's message.

Endpoints

TBD

Todo

  • Add more examples
  • Add tests
  • Make better documentations

About

A LangChain playground using TypeScript

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •