Configuration
KM service requires a configuration file to start, typically named appsettings.Development.json
for local development or appsettings.Production.json
for production environments. The appropriate configuration file is automatically loaded, based on the ASPNETCORE_ENVIRONMENT
environment variable. If your development workstation doesn’t have this environment variable, it’s recommended to create it: ASPNETCORE_ENVIRONMENT == “Development”. In a production environment you’ll want to set ASPNETCORE_ENVIRONMENT = “Production”.
The KM repository includes a setup wizard to help you create your initial appsettings.Development.json
file:
cd service/Service
dotnet run setup
Follow the on-screen prompts to create or edit the configuration file. If needed, you can interrupt the script and run it multiple times to modify the settings.
Run the web service (upload and search endpoints)? YES
Protect the web service with API Keys? NO —— you can leave this off for this test
Enable OpenAPI swagger doc at /swagger/index.html? YES
Run the .NET pipeline handlers as a service? YES
How should memory ingestion be orchestrated? Using asynchronous distributed queues
Which queue service will be used? SimpleQueues —— this will use volatile queues in memory, suitable only for tests
Directory where to store queue messages: _tmp_queues
Where should the service store files? SimpleFileStorage —— this will use volatile storage in memory, suitable only for tests. You can manually edit appsettings.development.json to persist files on disk.
Directory where to store files: _tmp_files
Which service should be used to extract text from images? None
When importing data, generate embeddings? YES
When searching for text and/or answers, which embedding generator should be used? Azure OpenAI or OpenAI
OpenAI <text/chat model name> [current: gpt-3.5-turbo-16k]: Press ENTER to use default OpenAI <embedding model name> [current: text-embedding-ada-002]: Press ENTER to use default OpenAI <API Key>: sk-*********************************
When searching for answers, which memory DB service contains the records? SimpleVectorDb —— this will use volatile storage in memory, suitable only for tests. You can manually edit appsettings.development.json to persist files on disk, or choose one of the available options suggested.
Directory where to store vectors: _tmp_vectors
When generating answers and synthetic data, which LLM text generator should be used? Azure OpenAI or OpenAI
Log level? Information
Great! If you completed the wizard, you should be ready to start the service and run the examples below.
- If you selected any of the “simpleXYZ” dependencies, then data will be stored in memory only, and automatically discarded when the service stops. Edit the configuration file manually to persist data on disk. More information here.
- The configuration wizard uses some default settings that you might want to change. After running the examples, take a look at the included appsettings.json to see all the available options, and read the Service Configuration doc for more information.