Skip to content

Commit 6420289

Browse files
committed
Fix backwards incompatible change in ai extension
The name of this property changed during the development of the ai extension, and in the latest verison, we dropped support for shadowing the same value across both names, so this is now an error.
1 parent d8bb11e commit 6420289

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

packages/ai/src/core.ts

+2-6
Original file line numberDiff line numberDiff line change
@@ -218,15 +218,11 @@ export class RAGClient {
218218
headers: {
219219
"Content-Type": "application/json",
220220
},
221-
body: JSON.stringify({
222-
...request,
223-
input: request.inputs,
224-
}),
221+
body: JSON.stringify(request),
225222
});
226223

227224
if (!response.ok) {
228-
const bodyText = await response.text();
229-
throw new Error(bodyText);
225+
await handleResponseError(response);
230226
}
231227

232228
const data: { data: { embedding: number[] }[] } = await response.json();

0 commit comments

Comments
 (0)