Skip to main content

This is the Python package py-llm-factory.

Project description

Welcome

llm-factory is a python package that can select and install LLM provider dynamically.

Usage

import py_llm_factory

# By default, it will use the LLM provider from the environment variables.
client = py_llm_factory.get_openai_compatible_client()

# You can also specify the LLM provider and API key.
client = py_llm_factory.get_openai_compatible_client(provider='openai', api_key='your_api_key')

# Let's say if you want to use the Groq provider, you can do this:
client = py_llm_factory.get_openai_compatible_client(provider='groq', api_key='your_api_key')

# Or AWS Bedrock provider, you can do this:
client = py_llm_factory.get_openai_compatible_client(provider='openai', api_key='your_api_key', base_url='https://bedrock-runtime.us-east-1.amazonaws.com/openai/v1')

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

py_llm_factory-0.1.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

py_llm_factory-0.1.0-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file py_llm_factory-0.1.0.tar.gz.

File metadata

  • Download URL: py_llm_factory-0.1.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for py_llm_factory-0.1.0.tar.gz
Algorithm Hash digest
SHA256 93492739f98df187639a0cd4b60a79a553db4dec3cc91a4a9b79f137e1be3545
MD5 82cec74c59d9e88108a0d02e297fdfbc
BLAKE2b-256 68aeb0e9a17003a95be7e232a8d5e3525c46b6cfec0a5001f0ffaab849d0ce99

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_llm_factory-0.1.0.tar.gz:

Publisher: deploy-to-pypi.yml on hktonylee/py-llm-factory

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file py_llm_factory-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: py_llm_factory-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for py_llm_factory-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 23fd3bbd72158b8f8ccc231abc62e14d57834337b43942eca0f8c94346936e84
MD5 e510c0a80202758a1b9b6a0b01eed081
BLAKE2b-256 03b98b4e502b5a518dd284ab484a90ea2676db99afffe101b51e76c8badf6e87

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_llm_factory-0.1.0-py3-none-any.whl:

Publisher: deploy-to-pypi.yml on hktonylee/py-llm-factory

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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