Skip to content

Commit

Permalink
[Azure] Update Batch API (#871)
Browse files Browse the repository at this point in the history
  • Loading branch information
deyaaeldeen authored and stainless-app[bot] committed May 31, 2024
1 parent ed4219a commit a70f641
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,6 @@ const _deployments_endpoints = new Set([
'/audio/translations',
'/audio/speech',
'/images/generations',
'/batches',
]);

const API_KEY_SENTINEL = '<Missing Key>';
Expand Down
6 changes: 3 additions & 3 deletions tests/lib/azure.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,15 +290,15 @@ describe('azure request building', () => {
fetch: testFetch,
});

test('handles Batch', async () => {
test('handles batch', async () => {
expect(
await client.batches.create({
completion_window: '24h',
endpoint: '/v1/chat/completions',
input_file_id: 'file-id',
}),
).toStrictEqual({
url: `https://example.com/openai/deployments/${deployment}/batches?api-version=${apiVersion}`,
url: `https://example.com/openai/batches?api-version=${apiVersion}`,
});
});

Expand Down Expand Up @@ -423,7 +423,7 @@ describe('azure request building', () => {
fetch: testFetch,
});

test('Batch is not handled', async () => {
test('handles batch', async () => {
expect(
await client.batches.create({
completion_window: '24h',
Expand Down

0 comments on commit a70f641

Please sign in to comment.