langchain-aiplugin  by langchain-ai

LangChain plugin for ChatGPT

created 2 years ago
502 stars

Top 62.8% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This project enables LangChain chains and agents to be deployed as AI Plugins for ChatGPT, allowing them to interact with ChatGPT or other agents. It targets developers building conversational AI applications who want to extend ChatGPT's capabilities with custom logic and data sources. The primary benefit is seamless integration of complex LangChain workflows into the ChatGPT ecosystem.

How It Works

The project acts as a FastAPI web server that exposes LangChain chains as API endpoints. It follows the AI Plugin specification, providing an OpenAPI schema and a manifest file for ChatGPT to discover and interact with the plugin. Developers define their LangChain logic in a chain.py file and metadata in constants.py, which are then served by the FastAPI application. This approach leverages LangChain's flexible chaining and agent capabilities within the familiar ChatGPT interface.

Quick Start & Requirements

  • Install Python 3.10.
  • Clone the repository: git clone git@github.com:langchain-ai/langchain-aiplugin.git
  • Install dependencies: poetry install
  • Set environment variables (e.g., LANGCHAIN_DIRECTORY_PATH, OPENAI_API_KEY, BEARER_TOKEN).
  • Run the API: poetry run app --port 8080
  • Access API docs: http://0.0.0.0:8080/docs
  • Official Docs: https://github.com/langchain-ai/langchain-aiplugin

Highlighted Details

  • Integrates LangChain chains and agents as ChatGPT AI Plugins.
  • Uses FastAPI for serving the plugin API.
  • Supports custom chain logic via chain.py and metadata via constants.py.
  • Includes example plugins for RetrievalQA and a calculator agent.

Maintenance & Community

This repository is part of the LangChain ecosystem. Further community and maintenance details would typically be found on the main LangChain GitHub or Discord.

Licensing & Compatibility

The specific license for this repository is not explicitly stated in the provided README. Compatibility for commercial use or closed-source linking would depend on the underlying LangChain license and any specific terms for this plugin project.

Limitations & Caveats

The README assumes familiarity with LangChain and the AI Plugin specification. Detailed setup and configuration for specific chains or agents are left to the developer to implement within the provided templates. The project is presented as a framework for integration rather than a fully managed solution.

Health Check
Last commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
0
Star History
2 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Didier Lopes Didier Lopes(Founder of OpenBB), and
1 more.

langgraph by langchain-ai

2.1%
17k
Agent orchestration framework for building controllable agents
created 2 years ago
updated 1 day ago
Feedback? Help us improve.