Skip to content

Cookie cutter template for getting started with making your own OpenAI formatted AI API utilizing the fastest Python Web Framework, ShuttleASGI.

License

Notifications You must be signed in to change notification settings

herumes/ShuttleASGI-AIAPI

Repository files navigation

ShuttleASGI Cookiecutter template

Cookiecutter template to boostrap a new ShuttleASGI application to build a Web API.

Getting started

pip install shuttleasgi-cli
shuttleasgi create --template aiapi

🚀 Project name example
📜 Use OpenAPI Documentation? Yes
🔧 Library to read settings Pydantic

Documentation

The documentation of the framework can be read here.

Features

  • Basic folder structure
  • Configuration of basic OpenAI formatted exceptions handlers
  • Configuration of basic middleware(s) with OpenAI style request ID's for logging and debugging purposes
  • OpenAI formatted template routes (/v1/models, /v1/chat/completions, /v1/images/generations, etc.)
  • Template AIModel system to create, load, manage, and use various AIModels; dynamically loads to /v1/models and gets for other routes respectively.
  • Settings handled using Pydantic Settings Management or essentials-configuration to read combined with Pydantic for validation
  • Strategy to read configuration from YAML, TOML, JSON, INI files, and environmental variables, or settings stored in a user's folder using essentials-configuration
  • Handling of dependency injection, using rodi
  • Strategy to handle authentication and authorization, using guardpost

For more information on rodi

For more information and documentation about rodi, see:

Using Cookiecutter

The template can also be used with Cookiecutter.

pip install cookiecutter

cookiecutter https://github.com/herumes/ShuttleASGI-AIAPI

Credits to original BlackSheep/BlackSheep-CLI creator(s).

About

Cookie cutter template for getting started with making your own OpenAI formatted AI API utilizing the fastest Python Web Framework, ShuttleASGI.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages