Skip to main content

HTTP API for LLM with OpenAI compatibility

Project description

llm-http-api

HTTP API for LLM with OpenAI compatibility

Usage

> llm http-api --help
Usage: llm http-api [OPTIONS]

  Run a FastAPI HTTP server with OpenAI compatibility

Options:
  -h, --host TEXT       [default: 0.0.0.0]
  -p, --port INTEGER    [default: 8080]
  -l, --log-level TEXT  [default: info]
  --help                Show this message and exit.
> curl http://localhost:8080/v1/embeddings -X POST -H "Content-Type: application/json" -d '{
  "input": "Hello world",
  "model": "jina-embeddings-v2-small-en"
}'
{"object":"embedding","embedding":[-0.47561466693878174,-0.4471365511417389,...],"index":0}

Supported OpenAI Endpoints

Models

Embeddings

Unsupported OpenAI Endpoints

A detailed list of unimplemented OpenAI endpoints can be found here

Development

This repository manages the dev environment as a Nix flake and requires Nix to be installed

nix develop -c $SHELL
make deps.install
make deps.install/test
make test
make coverage
make lint
make format

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

llm-http-api-0.0.2.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llm_http_api-0.0.2-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file llm-http-api-0.0.2.tar.gz.

File metadata

  • Download URL: llm-http-api-0.0.2.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for llm-http-api-0.0.2.tar.gz
Algorithm Hash digest
SHA256 5af620131bee53ba82bd52042b859a043096dc9e594ef1fd88c5ab2406d50457
MD5 cec50ac5b2cbc10090751567493a92ed
BLAKE2b-256 e8e5da2a9ae7765f432b622f986cb1b12bdfdef09892462996d9d96e319326dd

See more details on using hashes here.

File details

Details for the file llm_http_api-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: llm_http_api-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for llm_http_api-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3b686bdcba1c3d67e1fced71c220011dada2006059231e7e4441ffcbb64327c7
MD5 40a400887f7e47dfd3caca37822c3097
BLAKE2b-256 0dc5f4bacc3f6f26163b539ac11ad77b2b3eb83372f49a58911e214ec9f7bf67

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