EE environment variables

In additon to the extra features mentioned in the overview page, you have access to additional configuraton options in the form of environment variables as an Entprprise Edition user.

ENV_SEED_CONFIGURATION

This variable allows you to start your Danswer instance with pre-configured options that persist across restarts.

Configuration Options

ENV_SEED_CONFIGURATION accepts a JSON string with the following options:

  • llms: List of LLM configurations (name, provider, api_key, api_base, api_version, custom_config, default_model_name, fast_default_model_name)
  • admin_user_emails: List of email addresses for automatic admin role assignment
  • seeded_name: Pre-set name for your Danswer instance
  • seeded_logo_path: Path to your logo within the assets folder

Usage Example

export ENV_SEED_CONFIGURATION='{"admin_user_emails": ["email@gmail.com"], "seeded_name": "Acme Corp", "seeded_logo_path": "assets/logo.png"}'

This configuration sets up admin email, instance name, and logo path.

API_KEY_HASH_ROUNDS

This variable allows you to configure the number of rounds used in the SHA-256 Crypt hashing algorithm for API keys.

  • Default value: 535000
  • Allowed range: 1000 to 999999999

Usage Example

export API_KEY_HASH_ROUNDS=600000

Increasing this value enhances security but may impact performance. The default value provides a good balance for most use cases.

Additional API Endpoints

Standard Answers

Endpoint: POST /query/standard-answer

This endpoint allows you to test the standard answers that would be returned for a given message and set of Slack bot categories.

Request Body

FieldTypeDescription
messagestringThe message to test against the standard answers.
slack_bot_categorieslist[string]The Slack bot categories to use when searching for standard answers.

Response

The response will contain the standard answers that match the provided message and categories, or an empty list of standard answers if none are found.

{
  "standard_answers": [
    {
      "id": 1,
      "keyword": "wifi",
      "answer": "The wifi password is \"XYZ\"",
      "categories": [
        {
          "id": 0,
          "name": "General"
        }
      ]
    }
  ],
  "error_msg": null
}

If no standard answers are found, the response will be:

{
  "standard_answers": [],
  "error_msg": null
}

Example Usage

You can test the endpoint using a tool like cURL:

curl -X POST 'http://localhost:8080/query/standard-answer' \
     -H 'Content-Type: application/json' \
     -d '{
       "message": "wifi password",
       "slack_bot_categories": ["General"]
     }'

This will test the standard answers for the message “wifi password” and the Slack bot category “General.”

If you have any questions, feel free to message us at founders@danswer.ai for clarification or join our Slack or Discord communities.