Skip to main content

llm-providers

A common, minimal-dependency, async-first interface for interacting with Large Language Model provider APIs.

Getting Started

pip install llm-providers

from llm_providers.openai import OpenAIProvider

async def main():
  provider = OpenAIProvider(
      connection_str=os.environ.get("OPENAI_API_KEY"),
  )

  completion = await provider.complete(prompt="hey i'm a robot who")
  assert completion.prompt == "hey i'm a robot who"
  assert type(completion.completion_text) == str

if __name__ == "__main__":
    asyncio.run(main())

License

This project is licensed under the Apache License

Acknowledgments

Much code borrowed from https://github.com/HazyResearch/manifest

Metadata

Release files for llm_providers 0.1.0

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

Source distribution (sdist)

Source distribution for llm_providers 0.1.0
File Size Uploaded Provenance Actions
llm_providers-0.1.0.tar.gz 14.9 kB Without provenance Details for llm_providers-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llm_providers 0.1.0
File Interpreter ABI Platform Actions
llm_providers-0.1.0-py2.py3-none-any.whl Python 2, Python 3 none any Details for llm_providers-0.1.0-py2.py3-none-any.whl

Total release size: 25.9 kB

Release files / llm_providers-0.1.0.tar.gz

Download URL llm_providers-0.1.0.tar.gz
Size 14.9 kB
Tags Source
SHA-256 checksum
How to use checksums
41b345a6f9eac872fdf32003309c85a754eb652f8d2100b31d008b5b11a5dd5c
BLAKE2b-256 checksum
How to use checksums
4e954e692627466ad0890f64f93e66191f5effa7d3356058b45ef8d0c0429dbf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.28.1

Release files / llm_providers-0.1.0-py2.py3-none-any.whl

Download URL llm_providers-0.1.0-py2.py3-none-any.whl
Size 11.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
f73cf280985304866b9fdedb6d5fbf86b971c225bcd2138d20b82f4646bb7486
BLAKE2b-256 checksum
How to use checksums
52865d1f3ee16019a7b8fcad93d4121b9b7641bb01c8c4907dc5a545f0d401e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.28.1

Security for llm_providers 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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