Skip to main content

A Python package creating rest api interface for LangChain

Project description

Langcorn

LangCorn is an API server that enables you to serve LangChain models and pipelines with ease, leveraging the power of FastAPI for a robust and efficient experience.

GitHub Contributors GitHub Last Commit GitHub Issues GitHub Pull Requests Github License

Features

  • Easy deployment of LangChain models and pipelines
  • High-performance FastAPI framework for serving requests
  • Scalable and robust solution for language processing applications
  • Supports custom pipelines and processing
  • Well-documented RESTful API endpoints
  • Asynchronous processing for faster response times

📦 Installation

To get started with LangCorn, simply install the package using pip:

pip install langcorn

⛓️ Quick Start

Run your LangCorn FastAPI server:

langcorn server examples.ex1:chain examples.ex2:chain

or as an alternative

python -m langcorn server examples.ex1:chain examples.ex2:chain

Import the necessary packages and create your FastAPI app:

from fastapi import FastAPI
from langcorn import create_service

app:FastAPI = create_service("examples.ex1:chain")

Multiple chains

from fastapi import FastAPI
from langcorn import create_service

app:FastAPI = create_service("examples.ex2:chain", "examples.ex1:chain")

Run your LangCorn FastAPI server:

uvicorn main:app --host 0.0.0.0 --port 8000

Now, your LangChain models and pipelines are accessible via the LangCorn API server.

Documentation

For more detailed information on how to use LangCorn, including advanced features and customization options, please refer to the official documentation.

👋 Contributing

Contributions to LangCorn are welcome! If you'd like to contribute, please follow these steps:

  • Fork the repository on GitHub
  • Create a new branch for your changes
  • Commit your changes to the new branch
  • Push your changes to the forked repository
  • Open a pull request to the main LangCorn repository

Before contributing, please read the contributing guidelines.

License

LangCorn is released under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langcorn-0.0.2.tar.gz (3.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page