diff --git a/README.md b/README.md index 8944bce..2146b63 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ To install Elasticsearch, follow the official [Elasticsearch documentation](http ### 2. Create the Index -You need to create an index with the prefix `index-ai-memory-` and a suffix that you can set in the configuration file under the `AI_MEMORY_ELASTIC_SEARCH_INDEX_SUFFIX` variable. This can be done via the Elasticsearch CLI or Kibana. +You need to create an index with the prefix `index-ai-memory-` and a suffix that you can set in the configuration file under the `AI_MEMORY_ELASTIC_SEARCH_WRITE_INDEX_SUFFIX` variable. This can be done via the Elasticsearch CLI or Kibana. Example using Elasticsearch CLI: ```sh diff --git a/gpt-values-override-conf.dist.sh b/gpt-values-override-conf.dist.sh index 58d326b..3ec80cc 100644 --- a/gpt-values-override-conf.dist.sh +++ b/gpt-values-override-conf.dist.sh @@ -7,13 +7,13 @@ export AI_MEMORY_ELASTIC_SEARCH_URL="https://your-elastic-search-url" # Elasticsearch write index name # This is the suffix of the index where the documents will be stored -# The final index name will be: index-ai-memory-${AI_MEMORY_ELASTIC_SEARCH_INDEX_SUFFIX} +# The final index name will be: index-ai-memory-${AI_MEMORY_ELASTIC_SEARCH_WRITE_INDEX_SUFFIX} # Example: default export AI_MEMORY_ELASTIC_SEARCH_WRITE_INDEX_SUFFIX="default" # Elasticsearch read index name # This is the suffix of the index where the documents will be read from -# The final index name will be: index-ai-memory-${AI_MEMORY_ELASTIC_SEARCH_INDEX_SUFFIX} +# The final index name will be: index-ai-memory-${AI_MEMORY_ELASTIC_SEARCH_READ_INDEX_SUFFIX} # Example: default export AI_MEMORY_ELASTIC_SEARCH_READ_INDEX_SUFFIX=* diff --git a/tests/test-generate-files.sh b/tests/test-generate-files.sh index c123049..fd76fc7 100755 --- a/tests/test-generate-files.sh +++ b/tests/test-generate-files.sh @@ -3,13 +3,13 @@ # Setup function to create necessary files before each test setup() { mkdir -p out - echo 'export AI_MEMORY_ELASTIC_SEARCH_URL="https://hw2nl.ddns.net/elasticsearch"' >gpt-values-override-conf.default.sh - echo 'export AI_MEMORY_ELASTIC_SEARCH_INDEX="index-ai-memory-default"' >>gpt-values-override-conf.default.sh - echo 'export AI_MEMORY_PERSONAL_NAME="Test"' >>gpt-values-override-conf.default.sh - echo 'export AI_MEMORY_EXTRA_PERSONAL_INFO="Interaction languages: English"' >>gpt-values-override-conf.default.sh + echo 'export AI_MEMORY_ELASTIC_SEARCH_URL="https://hw2nl.ddns.net/elasticsearch"' >conf/gpt-values-override-conf.default.sh + echo 'export AI_MEMORY_ELASTIC_SEARCH_WRITE_INDEX="index-ai-memory-default"' >>conf/gpt-values-override-conf.default.sh + echo 'export AI_MEMORY_PERSONAL_NAME="Test"' >>conf/gpt-values-override-conf.default.sh + echo 'export AI_MEMORY_EXTRA_PERSONAL_INFO="Interaction languages: English"' >>conf/gpt-values-override-conf.default.sh echo 'export AI_MEMORY_ELASTIC_SEARCH_URL="https://default-url.com"' >gpt-values-override-conf.dist.sh - echo 'export AI_MEMORY_ELASTIC_SEARCH_INDEX="default-index"' >>gpt-values-override-conf.dist.sh + echo 'export AI_MEMORY_ELASTIC_SEARCH_WRITE_INDEX="default-index"' >>gpt-values-override-conf.dist.sh cp ../gpt-schema.dist.yml ./gpt-schema.dist.yml cp ../gpt-instructions.dist.md ./gpt-instructions.dist.md @@ -40,8 +40,8 @@ teardown() { } @test "Check if fallback values are used when variables are not defined in override file" { - echo 'export AI_MEMORY_ELASTIC_SEARCH_INDEX=""' >gpt-values-override-conf.default.sh + echo 'export AI_MEMORY_ELASTIC_SEARCH_WRITE_INDEX=""' >gpt-values-override-conf.default.sh run bash ../generate-files.sh [ "$status" -eq 0 ] - [[ "$output" == *"Warning: The variable AI_MEMORY_ELASTIC_SEARCH_INDEX is not defined in gpt-values-override-conf.default.sh. The fallback value will be used."* ]] + [[ "$output" == *"Warning: The variable AI_MEMORY_ELASTIC_SEARCH_WRITE_INDEX is not defined in gpt-values-override-conf.default.sh. The fallback value will be used."* ]] }