Skip to main content

Package for calling llm clients asynchronously

Project description

LLM Client

Internal package for making multi-threaded calls to LLMs.

Supported Models

Cohere Command, Cohere Embed, OpenAI Models, Titan Embed, Mixtral

Install

pip install thinkcol_llm_client

Usage:

Normal Usage

from thinkcol_llm_client import OpenAIClient, BedrockClient
from thinkcol_llm_client import Anthropic

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

client = OpenAIClient()
client.embed(texts)

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

anthropic_client = BedrockClient(provider = Anthropic())
anthropic_client.invoke(questions)

Providers

The list of providers for bedrock models can be found in bedrock/clients. Support for new providers/models can be added in this file.

Tests

Unit tests for each provider and clients can be added in tests/unit/test_clients.py

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.3.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

thinkcol_llm_client-0.1.3-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file thinkcol_llm_client-0.1.3.tar.gz.

File metadata

  • Download URL: thinkcol_llm_client-0.1.3.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.8 Darwin/21.6.0

File hashes

Hashes for thinkcol_llm_client-0.1.3.tar.gz
Algorithm Hash digest
SHA256 906bff35351f34c63e3bc2f257b55ba35399a0fb9e626dccab8636ddc7d013c4
MD5 a0ca81dc9f3a827ae3720a996f6064d2
BLAKE2b-256 db05df94c0431b62f6672087e73cbd353f179dbd9deef443d52a2e0463741c0d

See more details on using hashes here.

File details

Details for the file thinkcol_llm_client-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for thinkcol_llm_client-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d8ff3ec864f64a8828c0c6d4cd99ccd727d95d9e752e0e431dd337d59314a3b0
MD5 ad65069aad177b53d1f3f0811eeb0ccd
BLAKE2b-256 e77c8249f98c604a254bf2547541e70b3e4d34fc3f6fdd9d411650a91c9b0d66

See more details on using hashes here.

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