Metadata-Version: 2.4
Name: jentic-apitools-llm
Version: 1.0.0a17
Summary: Jentic Apitools LLM - Unified LLM utilities and provider abstraction for consistent LLM usage across packages
Author: Jentic
Author-email: Jentic <hello@jentic.com>
License-Expression: Apache-2.0
License-File: LICENSE
License-File: NOTICE
Requires-Dist: pydantic>=2.7,<3.0
Requires-Dist: pydantic-settings>=2.0.0
Requires-Dist: requests>=2.31.0
Requires-Dist: jentic-apitools-common~=1.0.0a17
Requires-Dist: boto3>=1.43.17
Requires-Python: >=3.11
Project-URL: Homepage, https://github.com/jentic/jentic-apitools
Description-Content-Type: text/markdown

# Jentic API Tools - LLM

Unified LLM provider abstraction for consistent LLM usage across the Jentic API Tools monorepo. Supports Anthropic Claude, AWS Bedrock, OpenAI, and Google Gemini behind a common interface.

## Key Features

The package provides an `LLMHelper` facade that automatically selects the configured provider and model, with a `light_mode` option for cheaper operations. Under the hood, each provider implements the `LLMProvider` abstract base class with a synchronous `call` method. Response parsing utilities handle markdown fence stripping, JSON extraction, and success field parsing from canonical LLM payloads. A `SemanticContextBuilder` constructs structured context strings from OpenAPI specs for inclusion in prompts.

## Dependencies

Internal: `jentic.apitools.common`. External: requests, boto3.

## Installation

```bash
pip install jentic-apitools-llm
```

## Quick Start

```python
from jentic.apitools.llm import LLMHelper

helper = LLMHelper()  # Uses settings defaults
response = helper.call_llm("Summarize this API endpoint.")

# Light mode for cheaper operations
helper = LLMHelper(light_mode=True)
response = helper.call_llm("Quick summary.")
```

## Testing

```bash
pytest tests -v
```
