Skip to main content

Official Python SDK for the AI Semantic Engine

Project description

AI Semantic Engine Python SDK

The official Python client for the AI Semantic Engine.

Installation

pip install ai_semantic_engine_pythonsdk

Usage

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)

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

ai_semantic_engine_pythonsdk-1.0.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

ai_semantic_engine_pythonsdk-1.0.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file ai_semantic_engine_pythonsdk-1.0.0.tar.gz.

File metadata

File hashes

Hashes for ai_semantic_engine_pythonsdk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c50a58b89d4347af432f0360313a5a3e6d9d862755dad1d1c6f2ef8c21181fdf
MD5 aee499636e33dcb80d5daf8cb2b2c2f8
BLAKE2b-256 67e7a076c3462359977be7329c67668d16cd265b4b6ac3c13d05df7e822ce7cc

See more details on using hashes here.

File details

Details for the file ai_semantic_engine_pythonsdk-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ai_semantic_engine_pythonsdk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8602a00e37631642910fd035ee801f8acfe2fa43edd106f7537603e0df2d89d0
MD5 0f4e88b03951e15255b2e3ad7fc64726
BLAKE2b-256 cc0ad12509b0dd48be677effd3e40f1fcce494f45331cd07ebf580083734dcdc

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