Skip to main content

Python SDK for Semantic Equivalence API - optimize prompts for semantic equivalence

Project description

Semantic EQ SDK

This package provides a simple Python client for the Semantic EQ API.

Installation

pip install semantic-eq

Usage

from semantic_eq_sdk import SemanticEQ

# Initialize the client with your API key
client = SemanticEQ(api_key="YOUR_SEMANTIC_EQ_API_KEY")

# Optimize a prompt
original_prompt = "Your long and detailed prompt..."
result = client.optimize_prompt(original_prompt)

print("Optimized Prompt:", result.optimized_prompt)

Publishing a New Version (for Maintainers)

Publishing the SDK is handled by a script that automates the entire process.

Prerequisites:

  1. PyPI Account: You need an account on PyPI and an API token.
  2. Twine Configuration: Your local machine must be configured to authenticate with PyPI. You can do this by setting the TWINE_USERNAME and TWINE_PASSWORD environment variables.

To publish a new version:

  1. Navigate to the SDK directory: cd semantic_eq_sdk
  2. Run the publishing script. You have two options:
    • To automatically bump the patch version (e.g., 1.0.1 -> 1.0.2), run the script without arguments:
      ./publish_sdk.sh
      
    • To specify an exact version (e.g., for a major release like 2.0.0), provide it as an argument:
      ./publish_sdk.sh 2.0.0
      
  3. The script will handle everything else automatically.

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

semantic_eq-1.0.2.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

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

semantic_eq-1.0.2-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file semantic_eq-1.0.2.tar.gz.

File metadata

  • Download URL: semantic_eq-1.0.2.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for semantic_eq-1.0.2.tar.gz
Algorithm Hash digest
SHA256 4caf0a67f4430ba1f7b52360954f0e99e24132b87cf224f2cd6808c252af5a92
MD5 541d32f321a044d8d292250f19470080
BLAKE2b-256 a71c4cc029466f3792bfbc451dc384acb984d419ecff05ef51871d9cdbc07bb6

See more details on using hashes here.

File details

Details for the file semantic_eq-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: semantic_eq-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for semantic_eq-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1eeda05284faa054294f47fcba3a5e7bff5412cd19855f2f30be565fe6ffc388
MD5 dc96fe863f3a35bb61f6e5b5759132db
BLAKE2b-256 fb447c4dedc6952d9e4348af207a2af69d13fad632a478fd644a1e10e250887e

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