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.3.tar.gz (7.1 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.3-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: semantic_eq-1.0.3.tar.gz
  • Upload date:
  • Size: 7.1 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.3.tar.gz
Algorithm Hash digest
SHA256 a3c5d5c80c63e239ca69d55cbc4602829a86e12aa29754262a9ef0827037e639
MD5 80a463effd5b2ddb5795834fb2f7123b
BLAKE2b-256 ed3c6466c8ac1405940c0c52513013b20c5cf4a8eb940b2dba3280d2948f710c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: semantic_eq-1.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9d77b25408ea5f64cea9458304baa4042cd33c035ea922d90d4f47b062c985dc
MD5 0aadd7c3373b401779bc5a5405b46589
BLAKE2b-256 b10141f5d9791fbd640d2b68f5532b9e329ab9173f4b9ad5175ef1691e8e1fa6

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