We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f17bc73 commit c3bda2eCopy full SHA for c3bda2e
tests/api-resources/embeddings.test.ts
@@ -45,12 +45,11 @@ describe('resource embeddings', () => {
45
});
46
47
test('create: encoding_format=base64 should create float32 embeddings', async () => {
48
- const responsePromise = client.embeddings.create({
+ const response = await client.embeddings.create({
49
input: 'The quick brown fox jumped over the lazy dog',
50
model: 'text-embedding-3-small',
51
encoding_format: 'base64',
52
53
- const response = await responsePromise;
54
55
expect(response.data?.at(0)?.embedding).toBeInstanceOf(Array);
56
expect(Number.isFinite(response.data?.at(0)?.embedding.at(0))).toBe(true);
0 commit comments