Skip to main content

A wrapper library to abstract common llm providers

Project description

ext_llm - a wrapper library for common LLMs (WIP)

Installation

bash 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.7.tar.gz (15.8 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.7-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ext_llm-0.1.7.tar.gz
Algorithm Hash digest
SHA256 c7d08760f5b71c5cea896ff615719b8a05d17a61153aa4b3e83dcd46cbd60cf5
MD5 1cb71d1c3975acd42729fbb487fbff59
BLAKE2b-256 de36e817d0528ac5d949e183e695de2889736db987a0487c659c6826feb27869

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for ext_llm-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 0b836ec55c2c5a7202532b36768adf7ae4e099f829945cfacac0dbd8f07f55ec
MD5 412006146e1343fcfa6798a0b291b819
BLAKE2b-256 92ba310c40990e0f8065e1647180ea9f68f3f160e186423bfa68344f5c096bf5

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