Elsai Prompts v1.1.0#

Warning

Version 1.0.0 is deprecated. Please use version 1.1.0 or later for the latest features and improvements.

The Elsai Prompts package providing centralized prompt management with improved version control and traceability.

Prerequisites#

  • Python >= 3.9

  • .env file with appropriate API keys and configuration variables

Support#

Need Help With SDK Setup?

Our team is here to assist you with the installation and configuration process.

Contact Support

Installation#

To install the elsai-prompts package:

pip install --index-url https://elsai-core-package.optisolbusiness.com/root/elsai-prompts/ elsai-prompts==1.1.0

Migration to Elsai Foundry#

Key Changes in v1.1.0:

  • Centralized Management: All prompts are now centrally managed through Elsai Foundry

  • Enhanced Version Control: Improved prompt versioning and tracking capabilities

  • Better Traceability: Enhanced audit trails for prompt changes and usage

  • Unified Interface: Consistent API across all prompt management operations

Components#

1. PromptManager#

PromptManager is the central prompt management system for retrieving and managing prompt templates.

from elsai_prompts.prompt_manager import PromptManager

# Initialize the prompt manager
# Option 1: Pass base_url as parameter
prompt_manager = PromptManager(
    api_key="your_elsai_api_key",
    project_id="your_project_id",
    base_url="https://your-api-url.com"
)

# Option 2: Set PROMPT_MANAGER_API_URL environment variable
# export PROMPT_MANAGER_API_URL="https://your-api-url.com"
# prompt_manager = PromptManager(
#     api_key="your_elsai_api_key",
#     project_id="your_project_id"
# )

# Retrieve an active prompt version
prompt = prompt_manager.get_active_prompt_version(prompt_name="sampleprompt")
print(prompt)

2. Key Features#

The Elsai Prompts package provides essential prompt management capabilities:

Active Prompt Retrieval: - Retrieve the currently active version of any prompt template - Simple and straightforward API for prompt access - Automatic version management

Project-based Organization: - Organize prompts by project ID - Secure access control through API keys - Centralized prompt management

Integration Benefits: - Seamless integration with other Elsai components - Consistent API across all prompt operations - Easy migration from previous prompt management systems