Skip to main content

A wrapper library to abstract common llm providers

Project description

ext_llm - a wrapper library for common LLMs (WIP)

Installation

pip install ext_llm

Usage

import ext_llm as xllm
#read config yaml file
config : str = open("ext_llm_config.yaml").read()
#initialize extllm library
extllm = xllm.init(config)

extllm.list_available_models()

llm_client = extllm.get_model("aws")
llm_client1 = extllm.get_model("groq")

# non blocking calls
future1 = llm_client.generate_text("You're an helpful assistant", "Say hello world", 10, 0.5)
future2 = llm_client1.generate_text("You're an helpful assistant", "Say hello world", 10, 0.5)

# blocking calls waiting for the result
print(future2.result())
print(future1.result())

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

ext_llm-0.1.9.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

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

ext_llm-0.1.9-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file ext_llm-0.1.9.tar.gz.

File metadata

  • Download URL: ext_llm-0.1.9.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for ext_llm-0.1.9.tar.gz
Algorithm Hash digest
SHA256 b6c2db54d68a258aecf43cb6a3d2a6469939588458918cdac7860bd9c15bbe20
MD5 89e31a6948d607d1144ee98b3063e538
BLAKE2b-256 872f790527e180ce97299c8a042fd5f7b8274327bb553272452a1657848b620d

See more details on using hashes here.

File details

Details for the file ext_llm-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: ext_llm-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for ext_llm-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 e86ff11403a25d5351a6680ea93bbdd00cce60485850d24029d50d733b7a36e7
MD5 aed7b717ed6beaf43ce2a79c6f5f3b83
BLAKE2b-256 d30d1b8bc0097f227e41883710856392d00e629fe27a1d00cadf94c1824fe15e

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