diff --git a/SqlDatabaseVectorSearch/Program.cs b/SqlDatabaseVectorSearch/Program.cs index 8fb3be2..522a857 100644 --- a/SqlDatabaseVectorSearch/Program.cs +++ b/SqlDatabaseVectorSearch/Program.cs @@ -34,6 +34,11 @@ builder.Services.AddHybridCache(options => }; }); +builder.Services.ConfigureHttpClientDefaults(builder => +{ + builder.AddStandardResilienceHandler(); +}); + // Semantic Kernel is used to generate embeddings and to reformulate questions taking into account all the previous interactions, // so that embeddings themselves can be generated more accurately. builder.Services.AddKernel() @@ -46,8 +51,8 @@ builder.Services.AddScoped(); builder.Services.AddOpenApi(options => { - options.AddDefaultResponse(); options.RemoveServerList(); + options.AddDefaultResponse(); }); builder.Services.AddDefaultProblemDetails(); diff --git a/SqlDatabaseVectorSearch/Settings/AppSettings.cs b/SqlDatabaseVectorSearch/Settings/AppSettings.cs index 74564bc..76ed3ad 100644 --- a/SqlDatabaseVectorSearch/Settings/AppSettings.cs +++ b/SqlDatabaseVectorSearch/Settings/AppSettings.cs @@ -4,7 +4,7 @@ public class AppSettings { public int MaxTokensPerLine { get; init; } = 300; - public int MaxTokensPerParagraph { get; init; } = 1024; + public int MaxTokensPerParagraph { get; init; } = 1000; public int OverlapTokens { get; init; } = 100; diff --git a/SqlDatabaseVectorSearch/SqlDatabaseVectorSearch.csproj b/SqlDatabaseVectorSearch/SqlDatabaseVectorSearch.csproj index dce7c0e..94a38eb 100644 --- a/SqlDatabaseVectorSearch/SqlDatabaseVectorSearch.csproj +++ b/SqlDatabaseVectorSearch/SqlDatabaseVectorSearch.csproj @@ -13,6 +13,7 @@ + diff --git a/SqlDatabaseVectorSearch/appsettings.json b/SqlDatabaseVectorSearch/appsettings.json index 7c0435b..1dc56e4 100644 --- a/SqlDatabaseVectorSearch/appsettings.json +++ b/SqlDatabaseVectorSearch/appsettings.json @@ -6,14 +6,14 @@ "ChatCompletion": { "Endpoint": "", "Deployment": "", - "ApiKey": "", - "ModelId": "" // o1, gpt-4o, gpt-4, gpt-3.5 + "ModelId": "", // o1, gpt-4o, gpt-4, gpt-3.5 + "ApiKey": "" }, "Embedding": { "Endpoint": "", "Deployment": "", + "ModelId": "", // text-embedding-3-small, text-embedding-3-large, text-embedding-ada-002 "ApiKey": "", - "ModelId": "", // Set this value only if you're using a model that allows to specify the dimensions of the embeddings // (e.g. text-embedding-3-small or text-embedding-3-large). Currently, a maximum value of 1998 is supported. "Dimensions": null