Skip to main content

EigenDB's Official Python API

Project description

EigenDB's Official Python API 🐍

OpenAI Ollama

A Python client for EigenDB's REST API.

Installation

pip install eigen-client

Example usage:

import os
from eigen_client.index import Index
from eigen_client.data_types import Document

index = Index(
    url="http://localhost:8080",
    api_key="your eigendb api key...",
    model_name="text-embedding-3-small",
    model_provider="openai",
    model_provider_api_key="your openai api key..."
)

documents = [
    Document(id=1, data="Fresh herbs boost flavor.", metadata={"recipe_id": "123"}),
    Document(id=2, data="Slow simmer blends soup.", metadata={"recipe_id": "456"}),
    Document(id=3, data="Homemade bread smells great.", metadata={"recipe_id": "789"}),
    Document(id=4, data="Grilled veggies taste sweeter.", metadata={"recipe_id": "987"}),
    Document(id=5, data="Cast iron sears steak well.", metadata={"recipe_id": "654"})
]

index.upsert_docs(documents)

results = index.search_docs(
    string="Baking",
    k=3
)

print(results)

Made with ❤️ by developers, for developers.

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

eigen_client-1.0.3.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

eigen_client-1.0.3-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file eigen_client-1.0.3.tar.gz.

File metadata

  • Download URL: eigen_client-1.0.3.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.5

File hashes

Hashes for eigen_client-1.0.3.tar.gz
Algorithm Hash digest
SHA256 003c048c9915452d27452951e173854b20cedf8f40986d401d56e75138d80e5d
MD5 42c8147e922afc8ef9845ccf55144b4e
BLAKE2b-256 a17157df8968888050d099579cdbae3089c40ee3a206a19bc95ca7f956190d0b

See more details on using hashes here.

File details

Details for the file eigen_client-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: eigen_client-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.5

File hashes

Hashes for eigen_client-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a0bedcbf95e73fce9d6dcf3f0db4b294d7f661a66adc535291b4d0020f91396b
MD5 5eeaf114a39e3b6fa431ea3b76333d04
BLAKE2b-256 67f77e048d6a7723c414e11360a0e12806131d797a488e5a32467f8a663c6af7

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