diff --git a/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/AiIntegration/VectorSearch/VectorSearchUsingDynamicQuery.cs b/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/AiIntegration/VectorSearch/VectorSearchUsingDynamicQuery.cs index 7d789e2f9..fb87137e1 100644 --- a/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/AiIntegration/VectorSearch/VectorSearchUsingDynamicQuery.cs +++ b/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/AiIntegration/VectorSearch/VectorSearchUsingDynamicQuery.cs @@ -10,7 +10,7 @@ using Raven.Client.Documents.Queries.Vector; using Raven.Documentation.Samples.Orders; -namespace Raven.Documentation.Samples.AiIntegration +namespace Raven.Documentation.Samples.AiIntegration.VectorSearch { public class VectorSearchUsingDynamicQuery { diff --git a/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/AiIntegration/VectorSearch/VectorSearchUsingStaticIndex.cs b/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/AiIntegration/VectorSearch/VectorSearchUsingStaticIndex.cs index 1d922cd97..98c2f0e33 100644 --- a/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/AiIntegration/VectorSearch/VectorSearchUsingStaticIndex.cs +++ b/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/AiIntegration/VectorSearch/VectorSearchUsingStaticIndex.cs @@ -8,7 +8,7 @@ using Raven.Client.Documents.Queries.Vector; using Raven.Documentation.Samples.Orders; -namespace Raven.Documentation.Samples.AiIntegration +namespace Raven.Documentation.Samples.AiIntegration.VectorSearch { public class VectorSearchUsingStaticIndex { @@ -67,11 +67,11 @@ public Products_ByVector_Text_JS() { Maps = new HashSet() { - $@"map('Products', function (product) {{ - return {{ + @"map('Products', function (product) { + return { VectorFromText: createVector(product.Name) - }}; - }})" + }; + })" }; Fields = new(); @@ -145,11 +145,11 @@ public Movies_ByVector_Single_JS() { Maps = new HashSet() { - $@"map('Movies', function (movie) {{ - return {{ + @"map('Movies', function (movie) { + return { VectorFromSingle: createVector(movie.TagsEmbeddedAsSingle) - }}; - }})" + }; + })" }; Fields = new(); @@ -224,11 +224,11 @@ public Movies_ByVector_Int8_JS() { Maps = new HashSet() { - $@"map('Movies', function (movie) {{ - return {{ + @"map('Movies', function (movie) { + return { VectorFromInt8Arrays: createVector(movie.TagsEmbeddedAsInt8) - }}; - }})" + }; + })" }; Fields = new(); @@ -294,13 +294,13 @@ public Products_ByMultipleFields_JS() { Maps = new HashSet() { - $@"map('Products', function (product) {{ - return {{ + @"map('Products', function (product) { + return { PricePerUnit: product.PricePerUnit, Name: product.Name, VectorFromText: createVector(product.Name) - }}; - }})" + }; + })" }; Fields = new(); @@ -357,12 +357,12 @@ public Categories_ByPreMadeTextEmbeddings_JS() { Maps = new HashSet() { - $@"map('Categories', function (category) {{ - return {{ + @"map('Categories', function (category) { + return { VectorFromTextEmbeddings: loadVector('Name', 'id-for-task-open-ai') - }}; - }})" + }; + })" }; Fields = new(); diff --git a/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/AiIntegration/VectorSearch/VectorSearchWithAttachments.cs b/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/AiIntegration/VectorSearch/VectorSearchWithAttachments.cs index 12c4d45a6..718b06ded 100644 --- a/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/AiIntegration/VectorSearch/VectorSearchWithAttachments.cs +++ b/Documentation/7.0/Samples/csharp/Raven.Documentation.Samples/AiIntegration/VectorSearch/VectorSearchWithAttachments.cs @@ -11,7 +11,7 @@ using Raven.Client.Documents.Operations.Indexes; using Raven.Documentation.Samples.Orders; -namespace Raven.Documentation.Samples.AiIntegration +namespace Raven.Documentation.Samples.AiIntegration.VectorSearch { public class VectorSearchWithAttachments { @@ -67,15 +67,15 @@ public Companies_ByVector_FromTextAttachment_JS() { Maps = new HashSet { - $@"map('Companies', function (company) {{ + @"map('Companies', function (company) { var attachment = loadAttachment(company, 'description.txt'); if (!attachment) return null; - return {{ + return { VectorFromAttachment: createVector(attachment.getContentAsString('utf8')) - }}; - }})" + }; + })" }; Fields = new Dictionary() @@ -146,15 +146,15 @@ public Companies_ByVector_FromNumericalAttachment_JS() { Maps = new HashSet() { - $@"map('Companies', function (company) {{ + @"map('Companies', function (company) { var attachment = loadAttachment(company, 'vector_base64.raw'); if (!attachment) return null; - return {{ + return { VectorFromAttachment: createVector(attachment.getContentAsString('utf8')) - }}; - }})" + }; + })" }; Fields = new();