Skip to main content

A Python SDK for interacting with the Reigent API.

Project description

Rei Core SDK (Python)

A Python SDK for interacting with the Reigent, providing a simple interface for chat completions and agent management.

Features

  • Chat completion functionality
  • Agent management

Installation

Install the package using pip:

pip install reicore_sdk

Quick Start

from reicore_sdk import ReiCoreSdk

# Initialize the SDK with your Reigent Secret key
rei_agent = ReiCoreSdk("your-reiagent-secret-key")

# Get agent details
agent = rei_agent.get_agent()
print("Agent Details:", agent)

# Send a chat completion request
# Type: Text
message = {
    "messages": [
        {
            "role": "user",
            "content": "Hello world"
        }
    ],
    "tools": []
}

# Type: Image_url
message = {
    "messages": [
        {
            "role": "user",
            "content": [
                { "type": "text", "text": "What is in this image" },
                { "type": "image_url",
                    "image_url": {
                        "url": "https://test.png"
                    }
                }
            ]
        }
    ],
    "tools": []
}

# Type: File (Pdf)
message = {
    "messages": [
        {
            "role": "user",
            "content": [
                { "type": "text", "text": "What is in this docs" },
                { "type": "file",
                    "file": {
                        "filename": "Sample file name"
                        "file_data": "data:application/pdf;base64,ewrawsdasdgfff...."
                    }
                }
            ]
        }
    ],
    "tools": []
}

response = rei_agent.chat.completion(message)
print("Chat Completion:", response)

Error Handling

The SDK includes built-in error handling for API requests. All methods will raise exceptions with descriptive messages if there are any issues with the API calls.

Requirements

  • Python >= 3.6
  • requests >= 2.25.1

License

MIT License

Support

For support, please contact rei.analoglabs@proton.me

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

reicore_sdk-0.1.3.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

reicore_sdk-0.1.3-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file reicore_sdk-0.1.3.tar.gz.

File metadata

  • Download URL: reicore_sdk-0.1.3.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for reicore_sdk-0.1.3.tar.gz
Algorithm Hash digest
SHA256 7083d84d9f97da80015eaea6d2d91e23caadfdfa259ad6a5799c2eb7f786c11f
MD5 c42fd0df2a5041ed06681a825c960e06
BLAKE2b-256 fbc9ba651836fea05f97028e5b35cbdc24ecf473a01a611989575cd2f1fff3b1

See more details on using hashes here.

File details

Details for the file reicore_sdk-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: reicore_sdk-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for reicore_sdk-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 94d59b229707b898653c91c31fb893c5a6b13a32572a65ac29a93bd9e2ba0853
MD5 3ef40547c8e689e769160a6febf60f4a
BLAKE2b-256 83303e67e87219da7416329fe0a6d8a0122d8aacfe8c71b6c5f2c299e60bd11b

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