Metadata-Version: 2.4
Name: ai_semantic_engine
Version: 1.0.0
Summary: Official Python SDK for the AI Semantic Engine
Home-page: https://github.com/ai-semantic-engine/python-sdk
Author: Olaiwola Akeem Salau
Author-email: olaiwolaakeem@gmail.com
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.0.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# AI Semantic Engine Python SDK

The official Python client for the AI Semantic Engine.

## Installation

```bash
pip install ai_semantic_engine
```

## Usage

```python
from ai_semantic_engine.client import AiSemanticEngineClient

# Initialize the client
client = AiSemanticEngineClient(base_url="http://localhost:8200", api_key="YOUR_API_KEY")

# 1. Embed Text
embeddings = client.embed("Hello world", model="fast")

# 2. Compute Similarity
score = client.similarity("Apple", "Orange")
print(f"Similarity: {score}%")

# 3. Store Knowledge
client.store_item(text="Machine learning is fascinating.", metadata={"topic": "AI", "source": "wiki"})

# 4. Search Knowledge
results = client.search(query="Tell me about AI", top_k=3, filters={"topic": "AI"})
for r in results:
    print(r["score"], r["text"])
```

## Endpoints Supported

- `embed` and `embed-batch`
- `similarity`
- `store_item` (items endpoint)
- `search`
- `detect_duplicates` (detect-duplicates endpoint)
