File tree Expand file tree Collapse file tree
semantic-kernel/concepts/ai-services/embedding-generation Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -588,15 +588,21 @@ An extension method `GenerateEmbeddingAsync` is also available for single value
588588Here is an example of how to invoke the service with multiple values.
589589
590590``` csharp
591- IList < ReadOnlyMemory < float >> embeddings await textEmbeddingGenerationService .GenerateEmbeddingsAsync ([" sample text 1" , " sample text 2" ]);
592- ```
591+ IList < ReadOnlyMemory < float >> embeddings =
592+ await textEmbeddingGenerationService .GenerateEmbeddingsAsync (
593+ [
594+ " sample text 1" ,
595+ " sample text 2"
596+ ]);
597+ ```
593598
594599Here is an example of how to invoke the service with a single value .
595600
596601```csharp
597602using Microsoft .SemanticKernel .Embeddings ;
598603
599- ReadOnlyMemory < float > embedding await textEmbeddingGenerationService .GenerateEmbeddingAsync ([" sample text 1" , " sample text 2" ]);
604+ ReadOnlyMemory < float > embedding =
605+ await textEmbeddingGenerationService .GenerateEmbeddingAsync (" sample text" );
600606```
601607
602608::: zone-end
You can’t perform that action at this time.
0 commit comments