GithubHelp home page GithubHelp logo

langchain-demo's Introduction

LangChain-demo

This is a demo project to demonstrate the usage of the LangChain framework.

Currently, this project integrates with the following Large Language Models (LLMs):

In the future, we plan to add support for additional APIs such as Ollama and others. Stay tuned for updates!

Start the project

Prerequisites

  • Poetry
  • Pyenv

more details on how to install and setup pyenv and poetry can be found in the appendix (or enable virtualenvs.prefer-active-python to true)

Initial project

  1. Clone this repository

  2. Install dependencies using poetry

    poetry install --no-root
  3. Signup for LangSmith

  4. Remember the API key from the LangSmith-Personal-API Keys

Configure project

Checkout Available models:

  1. Modify the config/config.yaml file to set the model and question fields
  2. Create a .env file based on the .env.example file. cp .env.example .env
  3. Set all the environment variables in the .env file

Start the project

Run the following command to start the FastAPI server using Uvicorn:

poetry run uvicorn main:app --reload

or

poetry run fastapi dev main.py

Common Error Resolutions

If you encounter the following error:

TypeError: 'FieldInfo' object is not a mapping

You can resolve it by installing a specific version of the Pydantic library. Run the following command in your terminal:

pip install pydantic==1.10.2

langchain-demo's People

Contributors

justinhung0407 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.