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.1.tar.gz (3.5 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.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for ai_semantic_engine_pythonsdk-1.0.1.tar.gz
Algorithm Hash digest
SHA256 16191903b375580666c847f692fb42708552e64b596fdcee272f76a8aa0eaf76
MD5 f9ba3274b9b2b64de08ead2131bd94eb
BLAKE2b-256 070223b96cd87a7551a490c95f596bf381705c102ea1494307cc0323397d6920

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ai_semantic_engine_pythonsdk-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 07d89dbb759d93d2fce366dddc04f06c1952049d64bc87c0902fedfa3e1125fb
MD5 feec842e2425790c8eeb01e79f5f5481
BLAKE2b-256 4e4894415037aadb577a7cab26418f70eb6f3d9d307f7dd7d961ae979d80362e

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