-
-
Notifications
You must be signed in to change notification settings - Fork 529
Embeddings
Tolga Kayhan edited this page Feb 16, 2023
·
1 revision
var embeddingResult = await sdk.Embeddings.CreateEmbedding(new EmbeddingCreateRequest()
{
InputAsList = new List<string> {"The quick brown fox jumped over the lazy dog."},
Model = Models.TextSearchAdaDocV1
});
if (embeddingResult.Successful)
{
Console.WriteLine(embeddingResult.Data.FirstOrDefault());
}
else
{
if (embeddingResult.Error == null)
{
throw new Exception("Unknown Error");
}
Console.WriteLine($"{embeddingResult.Error.Code}: {embeddingResult.Error.Message}");
}