Skip to content

theodo-group/langchain-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

langchain-agent

A versatile and customizable language model assistant using OpenAI.

Demo

demo

Description

This project is a Python-based implementation that utilizes OpenAI's GPT model to create a helpful assistant capable of answering various questions, extracting information from web pages, and performing several other tasks. The assistant is easily extensible with new tools and features, allowing developers to tailor the functionality to specific use cases.

Installation

Prerequisites

  • Python 3.6 or higher
  • virtualenv

Setup

  1. Clone the repository:
git clone https://github.com/theodo-group/langchain-agent.git
  1. Navigate to the project directory:
cd langchain-agent
  1. Create a virtual environment:
python3 -m venv venv
  1. Activate the virtual environment:
source venv/bin/activate
  1. Install the required packages:
pip install -r requirements.txt

Usage

  1. Make sure your virtual environment is active:
source venv/bin/activate
  1. Run the app.py script:
python app.py

The assistant will process the queries provided in the app.py file and print the results.

To use the assistant with custom queries, modify the app.py file or create a new script that imports and initializes the Assistant class.

Extending the Assistant

To add new tools or features to the assistant, create a new Tool instance and add it to the tools list in the tools.py file. Make sure to provide a unique name, a function that implements the tool's functionality, and a description.

You can also create new prompt templates and output parsers by extending the base classes provided by the langchain library.

Acknowledgments

  • OpenAI for creating the GPT language model
  • The langchain library for providing a convenient way to interact with language models

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages