Skip to main content

svllm

Create a OpenAI-Compatible API Server for your LLM.

Usage

Install

$ pip install svllm

Prepare

svllm provided following HTTP APIs:

  • chat: /v1/chat/completions
  • complete: /v1/completions
  • embed: /v1/embeddings
  • models: /v1/models

You only need to implement the chat, complete, embed function (or part of them).

Set __model__, __owner__ for these functions can affect /v1/models API.

See src/protocol.py for more information.

Then you can use svllm in the following two ways:

CLI

If you have a demo.py file that implements a chat function, you can start it like this:

$ svllm --chat demo:chat
$ svllm-cli # client

Run svllm --help and svllm-cli --help for more information.

Library

You can also use svllm as a library. (also see demo.py)

import uvicorn
import svllm

if __name__ == '__main__':
    svllm.set_chat(svllm.examples.chat)
    svllm.set_complete(svllm.examples.complete)
    svllm.set_embed(svllm.examples.embed)

    app = svllm.create_app()
    uvicorn.run(app, host='0.0.0.0', port=5261)

Metadata

Release files for svllm 0.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for svllm 0.3.3
File Size Uploaded Provenance Actions
svllm-0.3.3.tar.gz 19.5 kB Without provenance Details for svllm-0.3.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for svllm 0.3.3
File Interpreter ABI Platform Actions
svllm-0.3.3-py3-none-any.whl Python 3 none any Details for svllm-0.3.3-py3-none-any.whl

Total release size: 47.4 kB

Release files / svllm-0.3.3.tar.gz

Download URL svllm-0.3.3.tar.gz
Size 19.5 kB
Tags Source
SHA-256 checksum
How to use checksums
32e0192c80a87bd6cad44acd60f502585f3d3f35560814411f4e885b54f6b3c5
BLAKE2b-256 checksum
How to use checksums
8932e55da7715d1f2f2aacd6324a7b2236ea119bc4ae11c7df5427d4d37877aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.8

Release files / svllm-0.3.3-py3-none-any.whl

Download URL svllm-0.3.3-py3-none-any.whl
Size 27.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e6c4e4e6e2e919f5b69cad66158984262bc50734f1a0cc5441d3fb43454d522b
BLAKE2b-256 checksum
How to use checksums
5c533113dc69cfe482eb82fd0e21fd3becf9816f95ec3f78e72d7e534fde9874
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.8

Security for svllm 0.3.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page