Skip to main content

Package for calling llm clients asynchronously

Project description

LLM Client

Internal package for making calls to LLMs.

Install

pip install thinkcol_llm_client

Usage:

Normal Usage

import asyncio
from clients.openai_client import OpenAIClient

texts = ["Hello", "Text 1", "ThinkCol"]

client = OpenAIClient()
asyncio.run(client.embed(texts))

questions = ["How do I implement best practices in data science projects" for _ in range(500)]
asyncio.run(client.invoke(questions))

Jupyter Notebook

An event loop is created and run automatically by Jupyter. Replace asyncio.run with await.

await client.embed(texts)

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

thinkcol_llm_client-0.1.1.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

thinkcol_llm_client-0.1.1-py3-none-any.whl (5.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page