Python SDK for the Lens Reasoning System
Project description
Lens Reasoning SDK
A Python SDK for the Lens Reasoning System that provides query processing and reasoning capabilities.
Installation
# Install from PyPI
pip install lens-reasoning-sdk
# Or install from source
cd /path/to/lens-sdk
pip install -e .
Prerequisites
- Python 3.8+
- Internet access to the Lens Reasoning System production API (
https://api.tupl.xyz)
Quick Start
from query_processor import LensQueryProcessor
from exceptions import ProcessingError
try:
# Initialize the query processor
processor = LensQueryProcessor("https://api.tupl.xyz")
# Process a query
result = processor.process_query("What are the implications of AI in healthcare?")
print(f"Answer: {result['final_answer']}")
print(f"Confidence: {result['confidence_overall']}")
print(f"Contract ID: {result['contract_id']}")
except ProcessingError as e:
print(f"Processing failed: {e}")
finally:
processor.close()
Available Methods
process_query(query, **kwargs)- Process a query through the reasoning systemget_contract(contract_id)- Get complete contract detailsget_reasoning_trace(contract_id)- Get detailed reasoning tracelist_contracts(workflow_id=None, limit=20)- List existing contracts
Requirements
- Python 3.8+
- httpx>=0.25.0
- pydantic>=2.0.0
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lens_reasoning_sdk-1.0.0.tar.gz.
File metadata
- Download URL: lens_reasoning_sdk-1.0.0.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6ac3782398f4f011adf98e4f80bb972fa62d85a48fdda0bd17fe6c725de4676
|
|
| MD5 |
a0fa4b5327e5b3bf82e2153511043054
|
|
| BLAKE2b-256 |
e04a2a98a646734c63bb98a3aacc26b3ba42475168956425c320489a6cd87d32
|
File details
Details for the file lens_reasoning_sdk-1.0.0-py3-none-any.whl.
File metadata
- Download URL: lens_reasoning_sdk-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a607fb0e3b320d18b2a7b6bb8f366eb9241be636bc0496e46cafa1c6285faf9f
|
|
| MD5 |
572bc4233013d1f82491eb592146679b
|
|
| BLAKE2b-256 |
df3a2922699f068663b61ce24f665b3b8960c63744a04532ce337006a566b967
|