Skip to main content

A Python SDK for using Aymara to test your AI alignment.

Project description

Aymara Python SDK

Hi! 👋 We're Aymara.

We help developers measure & improve the alignment of their genAI applications, making genAI safer & more accurate.

So we built this library for you.

Our Python SDK provides convenient access to the Aymara REST API from Python 3.9+. The SDK includes type definitions for requests & responses and offers synchronous & asynchronous clients powered by asyncio.

Access our API with a free trial or upgrade for access to full funcionality.

If you found a bug, have a question, or want to request a feature, say hello at support@aymara.ai or open an issue on our GitHub repo.

Documentation

docs.aymara.ai/sdk_reference has our full library API.

Features

Now

  • Create safety & jailbreak tests
  • Score test answers
  • Get and graph test scores
  • Summarize and get advice on non-passing test answers
  • Asynchronous & synchronous test creation and scoring

Upcoming

  • Hallucination tests
  • Text-to-image tests
  • AI regulation tests

Installation

Install the SDK with pip. We suggest using a virtual environment to manage dependencies.

pip install aymara-ai

Configuration

The SDK needs to know who you are. Create an env variable with your Aymara API key:

export AYMARA_API_KEY=[AYMARA_API_KEY]

Or supply your key directly to the client:

client = AymaraAI(api_key="your_api_key")

Usage

Refer to this notebook for a walkthrough of how to use the SDK.

Versioning

This package generally follows SemVer conventions. Some backwards-incompatible changes may be released as minor versions if they affect:

  1. Static types without breaking runtime behavior.
  2. Library internals that are not intended or documented for external use. (Please open an issue if you are relying on internals).
  3. Virtually no users in practice.

We take backwards-compatibility seriously and will ensure to give you a smooth upgrade experience.

Requirements

Python 3.9 or higher.

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

aymara_ai-0.4.1.tar.gz (383.5 kB view details)

Uploaded Source

Built Distribution

aymara_ai-0.4.1-py3-none-any.whl (127.3 kB view details)

Uploaded Python 3

File details

Details for the file aymara_ai-0.4.1.tar.gz.

File metadata

  • Download URL: aymara_ai-0.4.1.tar.gz
  • Upload date:
  • Size: 383.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for aymara_ai-0.4.1.tar.gz
Algorithm Hash digest
SHA256 33957f46b68d1750b4c37695ac98121b875f3f7cc7b8c413965d204748975be3
MD5 b76d2eeeb90f6890e306b323944c13d9
BLAKE2b-256 9f45062aec6c7a6a375f7b13d483da7f156a0be2871e580d80e886f20e15d600

See more details on using hashes here.

File details

Details for the file aymara_ai-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: aymara_ai-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 127.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for aymara_ai-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4b072bdda9c83274a2816b9adf0e68b09ef8c987c7ebaa1b2cbcdb35e92840b6
MD5 b22f4631bb482534a803e86aec3e46ed
BLAKE2b-256 94c13b2496222a27bf1c971ae9cf9433855064a9595959bd9e3ae88ccab11032

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page