langchain-aiplugin  by langchain-ai

LangChain plugin for ChatGPT

Created 2 years ago
504 stars

Top 61.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 month ago

Responsiveness

1 day

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

Explore Similar Projects

Starred by Kevin Hou Kevin Hou(Head of Product Engineering at Windsurf), Eric Zhu Eric Zhu(Coauthor of AutoGen; Research Scientist at Microsoft Research), and
29 more.

browser-use by browser-use

0.6%
70k
SDK for AI agent browser control
Created 10 months ago
Updated 1 day ago
Feedback? Help us improve.