LM Async Client, openai client, azure openai client ...
Project description
lmclient
LM Async Client, OpenAI, Azure ...
Install
pip install lmclient-core
Usage
from lmclient import LMClient, AzureCompletion, OpenAICompletion
openai_completion = OpenAICompletion(model='gpt-3.5-turbo')
# azure_completion = AzureCompletion()
client = LMClient(openai_completion, async_capacity=5, max_requests_per_minute=20)
prompts = [
'Hello, my name is',
'can you please tell me your name?',
'i want to know your name',
'what is your name?',
]
values = client.async_run(prompts=prompts)
print(values)
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
lmclient-core-0.1.0.tar.gz
(7.4 kB
view hashes)
Built Distribution
Close
Hashes for lmclient_core-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89c62b7addd98b956f9f977b91f230354ab9a68a8b2b346f32f4c041238bf5ef |
|
MD5 | 70cdb0864781cf2770db5814c39810e1 |
|
BLAKE2b-256 | fc8afdb24cd4331a129b2c9b154508af82f2670f676c26d47e1a96845f93f3b8 |