@browser-ai/core 2.1.9 → 2.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -9,7 +9,7 @@ import { UIMessage } from 'ai';
|
|
|
9
9
|
type DownloadProgressCallback = (progress: number) => void;
|
|
10
10
|
|
|
11
11
|
type BrowserAIChatModelId = "text";
|
|
12
|
-
interface BrowserAIChatSettings extends LanguageModelCreateOptions {
|
|
12
|
+
interface BrowserAIChatSettings extends Omit<LanguageModelCreateOptions, "initialPrompts"> {
|
|
13
13
|
/**
|
|
14
14
|
* Expected input types for the session, for multimodal inputs.
|
|
15
15
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { UIMessage } from 'ai';
|
|
|
9
9
|
type DownloadProgressCallback = (progress: number) => void;
|
|
10
10
|
|
|
11
11
|
type BrowserAIChatModelId = "text";
|
|
12
|
-
interface BrowserAIChatSettings extends LanguageModelCreateOptions {
|
|
12
|
+
interface BrowserAIChatSettings extends Omit<LanguageModelCreateOptions, "initialPrompts"> {
|
|
13
13
|
/**
|
|
14
14
|
* Expected input types for the session, for multimodal inputs.
|
|
15
15
|
*/
|
package/dist/index.js
CHANGED
|
@@ -1380,11 +1380,15 @@ var BrowserAIChatLanguageModel = class {
|
|
|
1380
1380
|
}
|
|
1381
1381
|
);
|
|
1382
1382
|
const session = await this.getSession(
|
|
1383
|
-
|
|
1383
|
+
{ signal: options.abortSignal },
|
|
1384
1384
|
expectedInputs,
|
|
1385
1385
|
systemPrompt || void 0
|
|
1386
1386
|
);
|
|
1387
|
-
const
|
|
1387
|
+
const promptCallOptions = {
|
|
1388
|
+
...promptOptions,
|
|
1389
|
+
signal: options.abortSignal
|
|
1390
|
+
};
|
|
1391
|
+
const rawResponse = await session.prompt(messages, promptCallOptions);
|
|
1388
1392
|
const { toolCalls, textContent } = parseJsonFunctionCalls(rawResponse);
|
|
1389
1393
|
if (toolCalls.length > 0) {
|
|
1390
1394
|
const toolCallsToEmit = toolCalls.slice(0, 1);
|
|
@@ -1527,7 +1531,7 @@ var BrowserAIChatLanguageModel = class {
|
|
|
1527
1531
|
}
|
|
1528
1532
|
);
|
|
1529
1533
|
const session = await this.getSession(
|
|
1530
|
-
|
|
1534
|
+
{ signal: options.abortSignal },
|
|
1531
1535
|
expectedInputs,
|
|
1532
1536
|
systemPrompt || void 0
|
|
1533
1537
|
);
|