Skip to main content

LLM utilities with agents, file parsing, and preprocessing built in.

Project description

tokens-lab

LLM utilities with agents, file parsing, and preprocessing built in.

Features

  • Agent Framework: LangGraph-based agents with OpenAI integration
  • File Text I/O: Parse PDFs, DOCX, PPTX, and images with ease
  • Preprocessing: Text normalization and cleaning utilities
  • Azure Integration: Azure Storage and service utilities
  • ML Tools: String similarity and text analysis
  • Utilities: Date, Excel, JSON, and Pandas helpers
  • Logging: Structured logging support
  • Exception Handling: Custom exception hierarchy

Installation

pip install tokens-lab

Quick Start

LLM Agent

from llm_lab.agent import Agent
from llm_lab.agent.litellm_client import LiteLLMClient

client = LiteLLMClient(model="gpt-4", api_key="your-api-key")
agent = Agent(client=client)
response = agent.process("Hello, how can you help me?")

File Parsing

from llm_lab.filetextio import parsers

content = parsers.parse_document("document.pdf")

Text Preprocessing

from llm_lab.preprocessing import text_normalization

clean_text = text_normalization.normalize_text("messy   text  ")

Documentation

For complete documentation, visit: https://pwc-me-adv-strategyand.github.io/LLM_Lab/

Requirements

  • Python >= 3.10

License

MIT

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

tokens_lab-0.5.5.tar.gz (20.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tokens_lab-0.5.5-py3-none-any.whl (26.4 kB view details)

Uploaded Python 3

File details

Details for the file tokens_lab-0.5.5.tar.gz.

File metadata

  • Download URL: tokens_lab-0.5.5.tar.gz
  • Upload date:
  • Size: 20.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.6

File hashes

Hashes for tokens_lab-0.5.5.tar.gz
Algorithm Hash digest
SHA256 37aba298eb2f5fffc679f0eca77e6fbd67bf491fff74efd573aa99f83f28c176
MD5 4c625d12f782b52d8a5a97129486135b
BLAKE2b-256 bc42e503c98478fdb5477b690444450cee5fc67a39e57f37e4cfeb01e1840713

See more details on using hashes here.

File details

Details for the file tokens_lab-0.5.5-py3-none-any.whl.

File metadata

  • Download URL: tokens_lab-0.5.5-py3-none-any.whl
  • Upload date:
  • Size: 26.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.6

File hashes

Hashes for tokens_lab-0.5.5-py3-none-any.whl
Algorithm Hash digest
SHA256 5d9a6c9e1c6a8dad2eab8c4d981a052d939ab4c4e026e0736a419a8493e5c470
MD5 3ffee9e4f33bb188e16083a38e35fc6a
BLAKE2b-256 9f621d2b0c7aa4c8ce4278c52a4e1c7cd308a69152945094b403d7b37a65af9d

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