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 details)

Uploaded Source

File details

Details for the file langcorn-0.0.2.tar.gz.

File metadata

  • Download URL: langcorn-0.0.2.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.10.6 Linux/5.15.0-1035-azure

File hashes

Hashes for langcorn-0.0.2.tar.gz
Algorithm Hash digest
SHA256 b03a3304b6e75ff81765d14d9f12fc5f909a75a3b2884a6f94a8bee015bac942
MD5 f23afc95c5d052e1ddef019830d0da6b
BLAKE2b-256 0361242f5026b0a076164b2f149b31d6efda6e016b38865c3090d451daeba5bf

See more details on using hashes here.

Supported by

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