Skip to main content

LLM helpers for SRX services: ChatOpenAI wrapper, tool base and Tavily tool

Project description

srx-lib-llm

LLM helpers for SRX services built on LangChain.

What it includes:

  • responses_chat(prompt, cache=False): simple text chat via OpenAI Responses API
  • Tool strategy base and registry
  • Tavily search tool strategy

Designed to work with official OpenAI only.

Install

PyPI (public):

  • pip install srx-lib-llm

uv (pyproject):

[project]
dependencies = ["srx-lib-llm>=0.1.0"]

Usage

from srx_lib_llm import responses_chat
text = await responses_chat("Hello there", cache=True)

Tools:

from srx_lib_llm.tools import ToolStrategyBase, register_strategy, get_strategies
from srx_lib_llm.tools.tavily import TavilyToolStrategy

register_strategy(TavilyToolStrategy())
strategies = get_strategies()

Environment Variables

  • OPENAI_API_KEY (required)
  • OPENAI_MODEL (optional, default: gpt-4.1-nano)
  • TAVILY_API_KEY (optional, for the Tavily tool)

Release

Tag vX.Y.Z to publish to GitHub Packages via Actions.

License

Proprietary © SRX

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

srx_lib_llm-0.1.2.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

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

srx_lib_llm-0.1.2-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file srx_lib_llm-0.1.2.tar.gz.

File metadata

  • Download URL: srx_lib_llm-0.1.2.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for srx_lib_llm-0.1.2.tar.gz
Algorithm Hash digest
SHA256 7aa42d3adc58d45a3952641bf2706a1d105317bd35a77b8f3d23b1e044d07d64
MD5 0b86ac68b9d18a56b8571f87940b2725
BLAKE2b-256 8d8eeaecef4c54ad7437821547348f57d2daaf2a89c07f715219449b832f01fd

See more details on using hashes here.

File details

Details for the file srx_lib_llm-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: srx_lib_llm-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for srx_lib_llm-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2349d79b3cb6d58c2003fbbe3e0a8c4236adbdc1a6353ef83de407f2b60ffa98
MD5 e384942abb357cef95f3aa1db0a5c809
BLAKE2b-256 319fa21657a2947d1bf6b5897e58186005e8cf759e7067a05452a824367aea51

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