forked from microsoft/kernel-memory
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathappsettings.json
More file actions
241 lines (241 loc) · 13.4 KB
/
appsettings.json
File metadata and controls
241 lines (241 loc) · 13.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
{
"KernelMemory": {
"Services": {
"AzureAIContentSafety": {
// "ApiKey" or "AzureIdentity". For other options see <AzureAIContentSafetyConfig>.
// AzureIdentity: use automatic Entra (AAD) authentication mechanism.
// When the service is on sovereign clouds you can use the AZURE_AUTHORITY_HOST env var to
// set the authority host. See https://learn.microsoft.com/dotnet/api/overview/azure/identity-readme
// You can test locally using the AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET env vars.
"Auth": "AzureIdentity",
"Endpoint": "https://<...>",
"APIKey": "",
"GlobalSafetyThreshold": 0.0,
"IgnoredWords": []
},
"AzureAIDocIntel": {
// "APIKey" or "AzureIdentity".
// AzureIdentity: use automatic Entra (AAD) authentication mechanism.
// When the service is on sovereign clouds you can use the AZURE_AUTHORITY_HOST env var to
// set the authority host. See https://learn.microsoft.com/dotnet/api/overview/azure/identity-readme
// You can test locally using the AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET env vars.
"Auth": "AzureIdentity",
// Optional when Auth == AzureIdentity. Leave it null to use the default.
// When the service is on sovereign clouds, this setting might be necessary to configure Entra auth tokens.
// See https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/formrecognizer/Azure.AI.FormRecognizer/src/DocumentAnalysisAudience.cs
"AzureIdentityAudience": null,
// Required when Auth == APIKey
"APIKey": "",
"Endpoint": ""
},
"AzureAISearch": {
// "ApiKey" or "AzureIdentity". For other options see <AzureAISearchConfig>.
// AzureIdentity: use automatic Entra (AAD) authentication mechanism.
// When the service is on sovereign clouds you can use the AZURE_AUTHORITY_HOST env var to
// set the authority host. See https://learn.microsoft.com/dotnet/api/overview/azure/identity-readme
// You can test locally using the AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET env vars.
"Auth": "AzureIdentity",
// Optional when Auth == AzureIdentity. Leave it null to use the default.
// When the service is on sovereign clouds, this setting might be necessary to configure Entra auth tokens.
// See https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/search/Azure.Search.Documents/src/SearchAudience.cs
"AzureIdentityAudience": null,
// Required when Auth == APIKey
"APIKey": "",
"Endpoint": "https://<...>",
// Hybrid search is not enabled by default. Note that when using hybrid search
// relevance scores are different, usually lower, than when using just vector search
"UseHybridSearch": false,
// Helps improve relevance score consistency for search services with multiple replicas by
// attempting to route a given request to the same replica for that session. Use this when
// favoring consistent scoring over lower latency. Can adversely affect performance.
//
// Whether to use sticky sessions, which can help getting more consistent results.
// When using sticky sessions, a best-effort attempt will be made to target the same replica set.
// Be wary that reusing the same replica repeatedly can interfere with the load balancing of
// the requests across replicas and adversely affect the performance of the search service.
//
// See https://learn.microsoft.com/rest/api/searchservice/documents/search-post?view=rest-searchservice-2024-07-01&tabs=HTTP#request-body
"UseStickySessions": false
},
"AzureBlobs": {
// "ConnectionString" or "AzureIdentity". For other options see <AzureBlobConfig>.
// AzureIdentity: use automatic Entra (AAD) authentication mechanism.
// When the service is on sovereign clouds you can use the AZURE_AUTHORITY_HOST env var to
// set the authority host. See https://learn.microsoft.com/dotnet/api/overview/azure/identity-readme
// You can test locally using the AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET env vars.
"Auth": "AzureIdentity",
// Optional when Auth == AzureIdentity. Leave it null to use the default.
// When the service is on sovereign clouds, this setting might be necessary to configure Entra auth tokens.
"AzureIdentityAudience": null,
// Azure Storage account name, required when using AzureIdentity auth
// Note: you can use an env var 'KernelMemory__Services__AzureBlobs__Account' to set this
"Account": "",
// Container where to create directories and upload files
"Container": "smemory",
// Required when Auth == ConnectionString
// Note: you can use an env var 'KernelMemory__Services__AzureBlobs__ConnectionString' to set this
"ConnectionString": "",
// Setting used only for country clouds
"EndpointSuffix": "core.windows.net"
},
"AzureOpenAIEmbedding": {
// "ApiKey" or "AzureIdentity"
// AzureIdentity: use automatic Entra (AAD) authentication mechanism.
// You can test locally using the AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET env vars.
"Auth": "AzureIdentity",
// Optional when Auth == AzureIdentity. Leave it null to use the default.
// in which case use this to change the client audience.
"AzureIdentityAudience": null,
"Endpoint": "https://<...>.openai.azure.com/",
"APIKey": "",
// Your Azure Deployment name
"Deployment": "",
// The max number of tokens supported by model deployed
// See https://learn.microsoft.com/azure/ai-services/openai/concepts/models
"MaxTokenTotal": 8191,
// Which tokenizer to use to correctly measure the size of chunks.
// Supported values: "p50k", "cl100k", "o200k". Leave it empty if unsure.
// - Use p50k for the old text-davinci-003 models
// - Use cl100k for the old gpt-3.4 and gpt-4 family, and for text embedding models
// - Use o200k for the most recent gpt-4o family
"Tokenizer": "cl100k",
// The number of dimensions output embeddings should have.
// Only supported in "text-embedding-3" and later models developed with
// MRL, see https://arxiv.org/abs/2205.13147
"EmbeddingDimensions": null,
// How many embeddings to calculate in parallel. The max value depends on
// the model and deployment in use.
// See https://learn.microsoft.com/azure/ai-services/openai/reference#embeddings
"MaxEmbeddingBatchSize": 1,
// How many times to retry in case of throttling.
"MaxRetries": 10,
// Thumbprints of certificates that should be trusted for HTTPS requests when SSL policy errors are detected.
// This should only be used for local development when using a proxy to call the OpenAI endpoints.
"TrustedCertificateThumbprints": []
},
"AzureOpenAIText": {
// "ApiKey" or "AzureIdentity"
// AzureIdentity: use automatic Entra (AAD) authentication mechanism.
// You can test locally using the AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET env vars.
"Auth": "AzureIdentity",
// Optional when Auth == AzureIdentity. Leave it null to use the default.
// in which case use this to change the client audience.
"AzureIdentityAudience": null,
"Endpoint": "https://<...>.openai.azure.com/",
"APIKey": "",
"Deployment": "",
// The max number of tokens supported by model deployed
// See https://learn.microsoft.com/azure/ai-services/openai/concepts/models
"MaxTokenTotal": 16384,
// Which tokenizer to use to correctly measure the size of chunks.
// Supported values: "p50k", "cl100k", "o200k". Leave it empty if unsure.
// - Use p50k for the old text-davinci-003 models
// - Use cl100k for the old gpt-3.4 and gpt-4 family, and for text embedding models
// - Use o200k for the most recent gpt-4o family
"Tokenizer": "o200k",
// "ChatCompletion" or "TextCompletion"
"APIType": "ChatCompletion",
// How many times to retry in case of throttling.
"MaxRetries": 10,
// Thumbprints of certificates that should be trusted for HTTPS requests when SSL policy errors are detected.
// This should only be used for local development when using a proxy to call the OpenAI endpoints.
"TrustedCertificateThumbprints": []
},
"OpenAI": {
// Name of the model used to generate text (text completion or chat completion)
"TextModel": "gpt-4o-mini",
// The max number of tokens supported by the text model.
"TextModelMaxTokenTotal": 16384,
// Supported values: "p50k", "cl100k", "o200k". Leave it empty for autodetect.
"TextModelTokenizer": "",
// What type of text generation, by default autodetect using the model name.
// Possible values: "Auto", "TextCompletion", "Chat"
"TextGenerationType": "Auto",
// Name of the model used to generate text embeddings
"EmbeddingModel": "text-embedding-ada-002",
// The max number of tokens supported by the embedding model
// See https://platform.openai.com/docs/guides/embeddings/what-are-embeddings
"EmbeddingModelMaxTokenTotal": 8191,
// Supported values: "p50k", "cl100k", "o200k". Leave it empty for autodetect.
"EmbeddingModelTokenizer": "",
// OpenAI API Key
"APIKey": "",
// OpenAI Organization ID (usually empty, unless you have multiple accounts on different orgs)
"OrgId": "",
// Endpoint to use. By default the system uses 'https://api.openai.com/v1'.
// Change this to use proxies or services compatible with OpenAI HTTP protocol like LM Studio.
"Endpoint": "",
// How many times to retry in case of throttling
"MaxRetries": 10,
// The number of dimensions output embeddings should have.
// Only supported in "text-embedding-3" and later models developed with
// MRL, see https://arxiv.org/abs/2205.13147
"EmbeddingDimensions": null,
// How many embeddings to calculate in parallel.
// See https://platform.openai.com/docs/api-reference/embeddings/create
"MaxEmbeddingBatchSize": 100
},
"AWSS3": {
"Auth": "AccessKey",
// AccessKey ID, required when using AccessKey auth
// Note: you can use an env var 'KernelMemory__Services__AWSS3__AccessKey' to set this
"AccessKey": "",
// SecretAccessKey, required when using AccessKey auth
// Note: you can use an env var 'KernelMemory__Services__AWSS3__SecretAccessKey' to set this
"SecretAccessKey": "",
// Required bucket name where to create directories and upload files.
// Note: you can use an env var 'KernelMemory__Services__AWSS3__BucketName' to set this
"BucketName": ""
// Allows to specify a custom AWS or a compatible endpoint
// Examples: "https://s3.amazonaws.com", "https://s3.us-west-2.amazonaws.com", "http://127.0.0.1:9444"
// Note: you can use an env var 'KernelMemory__Services__AWSS3__Endpoint' to set this
// Note: you can test locally using S3 Ninja https://s3ninja.net
// "Endpoint": "https://s3.amazonaws.com"
},
"LlamaSharp": {
"TextModel": {
// path to file, e.g. "llama-2-7b-chat.Q6_K.gguf"
"ModelPath": "",
// Max number of tokens supported by the model
"MaxTokenTotal": 4096
// Optional parameters
// "GpuLayerCount": 32,
},
"EmbeddingModel": {
// path to file, e.g. "nomic-embed-text-v1.5.Q8_0.gguf"
"ModelPath": "",
// Max number of tokens supported by the model
"MaxTokenTotal": 4096
// Optional parameters
// "GpuLayerCount": 32,
}
}
},
"DataIngestion": {
// How many memory DB records to insert at once when extracting memories from
// uploaded documents (used only if the Memory Db supports batching).
"MemoryDbUpsertBatchSize": 100
},
"Retrieval": {
"SearchClient": {
// Maximum number of tokens accepted by the LLM used to generate answers.
// The number includes the tokens used for the answer, e.g. when using
// GPT4-32k, set this number to 32768.
// If the value is not set or less than one, SearchClient will use the
// max amount of tokens supported by the model in use.
"MaxAskPromptSize": -1,
// Maximum number of relevant sources to consider when generating an answer.
// The value is also used as the max number of results returned by SearchAsync
// when passing a limit less or equal to zero.
"MaxMatchesCount": 100,
// How many tokens to reserve for the answer generated by the LLM.
// E.g. if the LLM supports max 4000 tokens, and AnswerTokens is 300, then
// the prompt sent to LLM will contain max 3700 tokens, composed by
// prompt + question + grounding information retrieved from memory.
"AnswerTokens": 300,
// Text to return when the LLM cannot produce an answer.
"EmptyAnswer": "INFO NOT FOUND"
}
}
}
}