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
Release history Release notifications | RSS feed
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.12.tar.gz
(22.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
ext_llm-0.1.12-py3-none-any.whl
(26.2 kB
view details)
File details
Details for the file ext_llm-0.1.12.tar.gz.
File metadata
- Download URL: ext_llm-0.1.12.tar.gz
- Upload date:
- Size: 22.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36bd29e147125b3f9d860b37331f2a3afc187e4598c5b9ff926a839334e17f62
|
|
| MD5 |
7a231229323062760caea094e65d9384
|
|
| BLAKE2b-256 |
651e9ca613d8a7e8be7f5fe965c82040d00e3be54164c4fb94d00d1e1bbc296f
|
File details
Details for the file ext_llm-0.1.12-py3-none-any.whl.
File metadata
- Download URL: ext_llm-0.1.12-py3-none-any.whl
- Upload date:
- Size: 26.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0eca0836722da702df74a44ad4f1a011165600f0ed595a45b62c48a8bb7111df
|
|
| MD5 |
816c731a1719fc9d0a67661f844a2fdd
|
|
| BLAKE2b-256 |
8694ff4992d531a8c6959d9296ae41ddf91a4d2a74e20fcfdc83a93084540b81
|