Add new Embeddings endpoint (#12)

This commit is contained in:
Andy Day
2021-12-15 00:45:22 -08:00
committed by GitHub
parent 2c60423fd2
commit d6c1c1855d
2 changed files with 155 additions and 0 deletions

View File

@@ -51,4 +51,15 @@ func TestAPI(t *testing.T) {
if err != nil {
t.Fatalf("Search error: %v", err)
}
embeddingReq := EmbeddingRequest{
Input: []string{
"The food was delicious and the waiter",
"Other examples of embedding request",
},
}
_, err = c.CreateEmbeddings(ctx, embeddingReq, AdaSearchQuery)
if err != nil {
t.Fatalf("Embedding error: %v", err)
}
}