@g9tm/aiassistant 1.8.0 → 1.8.2
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/api.d.ts +2 -1
- package/dist/api.js +2 -1
- package/dist/pages.d.ts +2 -0
- package/package.json +2 -2
package/dist/api.d.ts
CHANGED
|
@@ -40,9 +40,10 @@ export declare function arr(v: unknown): unknown[];
|
|
|
40
40
|
export declare function item<T>(xs: readonly T[], i: number): T | undefined;
|
|
41
41
|
export declare class AssistantApi {
|
|
42
42
|
private readonly host;
|
|
43
|
-
private readonly base;
|
|
44
43
|
/** The time one request may take (a long poll waits up to 25 s on the server). */
|
|
45
44
|
timeoutMs: number;
|
|
45
|
+
private readonly base;
|
|
46
|
+
/** `base` is where the API is mounted; a missing trailing slash is added ("/api/x" called "/api/xstate"). */
|
|
46
47
|
constructor(host: AssistantHost, base?: string);
|
|
47
48
|
request(method: NonNullable<HostRequest["method"]>, path: string, body?: unknown, raw?: {
|
|
48
49
|
bytes: Uint8Array;
|
package/dist/api.js
CHANGED
|
@@ -30,11 +30,12 @@ export function item(xs, i) {
|
|
|
30
30
|
return k >= 0 && k < xs.length ? xs[k] : undefined;
|
|
31
31
|
}
|
|
32
32
|
export class AssistantApi {
|
|
33
|
+
/** `base` is where the API is mounted; a missing trailing slash is added ("/api/x" called "/api/xstate"). */
|
|
33
34
|
constructor(host, base = "/api/assistant/") {
|
|
34
35
|
this.host = host;
|
|
35
|
-
this.base = base;
|
|
36
36
|
/** The time one request may take (a long poll waits up to 25 s on the server). */
|
|
37
37
|
this.timeoutMs = 60000;
|
|
38
|
+
this.base = base.endsWith("/") ? base : base + "/";
|
|
38
39
|
}
|
|
39
40
|
async request(method, path, body, raw) {
|
|
40
41
|
const headers = { Accept: "application/json", "Accept-Language": this.host.locale };
|
package/dist/pages.d.ts
CHANGED
|
@@ -35,6 +35,8 @@ export declare function runCapability(assistant: Assistant, id: string, options?
|
|
|
35
35
|
concurrency?: number;
|
|
36
36
|
stopOnFailure?: boolean;
|
|
37
37
|
maxTokens?: number;
|
|
38
|
+
model?: string;
|
|
39
|
+
maxOutputTokens?: number;
|
|
38
40
|
}): Promise<string>;
|
|
39
41
|
/** The pages' texts over the assistant's: the host's texts and the core's win, then the pages' own. */
|
|
40
42
|
export declare function pageTexts(texts: Texts): Texts;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@g9tm/aiassistant",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.2",
|
|
4
4
|
"description": "Headless client of the G9 AI assistant: API client, run state, transports, block view models, safe text and Persian helpers. No DOM, no framework.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@g9tm/aiassistant-contracts": "1.8.
|
|
36
|
+
"@g9tm/aiassistant-contracts": "1.8.2"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "tsc -p tsconfig.json",
|