Secret Keys

The Secret Keys feature allows you to define and manage variables that can be used throughout the GenAI Stack, ensuring consistency and ease of access. Follow these steps to create and manage secret keys.

Steps to Create a Secret Key:

  1. Access the Secret Keys Section:

    • Navigate to the "Secret Keys" option on the main page of your GenAI Stack site.

  2. Add a New Secret Key:

  • Click on the "Add New" button.

  • Secret Key Name: Enter a name for your key.

  • Type: Select the type of key (either "Generic" or "Credential").

  • Value: Provide the value for your variable.

  • Click on the "Save Secret Key" button to save your new secret key.

  • These secret keys can then be used across various components within the GenAI Stack, making it easier to maintain consistency and streamline your workflows.

Using Secret Keys in Flows

Example: Using Secret Keys for API Keys

  1. Storing API Keys:

    • Navigate to the "Secret keys" section and create a new key with a name like azure_api_key.

    • Set the type to "Credential" and input your Azure API key as the value.

    • Save the variable.

  2. Accessing Secret Keys:

    • In your deployment or configuration settings, when prompted to enter the API key, click on the globe icon next to the input field.

    • This will open a dropdown menu where you can select the pre-defined secret key (azure_api_key in this case).

By using secret keys, you can easily update the value in one place, and it will automatically propagate to all components that reference this variable. This ensures consistency and simplifies management, especially when dealing with sensitive information like API keys.

More Use Cases:

  1. Configuration Settings:

    • Scenario: You need to manage configuration settings that are used across multiple components.

    • Secret Key Setup: Create secret keys of type "Generic" to store configuration values like server URLs, timeout settings, or feature flags.

    • Flow Integration: Access these keys in different parts of your application to ensure consistent behavior and easy updates.

  2. Default Values for User Inputs:

    • Scenario: You want to pre-fill forms or set default values in user interfaces.

    • Secret Key Setup: Create secret keys for default form values.

    • Flow Integration: Reference these keys in the UI components to automatically populate fields with the default data.

Managing Secret Keys:

  1. You can edit or delete secret keys as needed by navigating to the "Secret Keys" section and selecting the keys you want to manage.

  2. This ensures your application stays up-to-date with the latest values without the need to change individual components.

Last updated