Giter Site home page Giter Site logo

waseemhnyc / lanarky Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ajndkr/lanarky

0.0 0.0 0.0 21.39 MB

FastAPI framework to build production-grade LLM applications

Home Page: https://lanarky.readthedocs.io/en/latest/

License: MIT License

Python 98.95% Makefile 1.05%

lanarky's Introduction

lanarky-logo

stars Documentation Code Coverage License: MIT Twitter

PyPI version PyPI stats Supported Python Versions

A FastAPI framework to build production-grade LLM applications.

Table of Contents

๐Ÿš€ Features

  • ๐ŸŒ multi-mode token streaming
  • ๐Ÿ’ฌ Gradio plugin for fast prototyping
  • ๐Ÿ”— supports LangChain
  • ๐Ÿ—„๏ธ multiple LLM caching strategies

See Roadmap for upcoming features.

โ“ Why?

Many open-source projects for developing and deploying LLM applications have either opinionated designs, particularly regarding deployment, or limitations in terms of scalability. This is where Lanarky comes in. Lanarky is an open-source project that provides Python users with an unopinionated web framework for constructing and deploying LLM applications. By leveraging FastAPI as its foundation, Lanarky ensures that applications built with it are production-ready and can be seamlessly deployed on any cloud provider.

๐Ÿ’พ Installation

The library is available on PyPI and can be installed via pip.

pip install lanarky

You can find the full documentation at https://lanarky.readthedocs.io/en/latest/.

๐Ÿ”ฅ Build your first Langchain app

from dotenv import load_dotenv
from fastapi import FastAPI
from langchain.chains import ConversationChain
from langchain.chat_models import ChatOpenAI

from lanarky import LangchainRouter

load_dotenv()
app = FastAPI()

langchain_router = LangchainRouter(
    langchain_url="/chat",
    langchain_object=ConversationChain(
        llm=ChatOpenAI(temperature=0), verbose=True
    ),
    streaming_mode=0
  )
app.include_router(langchain_router)

See examples/ for list of available demo examples.

Create a .env file using .env.sample and add your OpenAI API key to it before running the examples.

demo

๐Ÿ“ Roadmap

๐Ÿคฉ Stargazers

Leave a โญ if you find this project useful.

Star History Chart

๐Ÿค Contributing

Code check Publish

Contributions are more than welcome! If you have an idea for a new feature or want to help improve lanarky, please create an issue or submit a pull request on GitHub.

See CONTRIBUTING.md for more information.

Contributors

โš–๏ธ License

The library is released under the MIT License.

โœจ Want to build LLM applications with us?

Are you interested in building LLM applications with us? We would love to hear from you! Reach out to us on Twitter @LanarkyAPI.

Let's connect and explore the possibilities of working together to create amazing LLM applications with Lanarky!

lanarky's People

Contributors

ajndkr avatar rogalvil avatar tooflex avatar dependabot[bot] avatar awtkns avatar aminedjeghri avatar krupskis avatar auxon avatar waseemhnyc avatar rbbby avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.