@openrouter/sdk 1.2.136 → 1.2.137
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/esm/funcs/internsChat.d.ts +34 -0
- package/esm/funcs/internsChat.js +133 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/errors/index.d.ts +1 -0
- package/esm/models/errors/index.js +1 -0
- package/esm/models/errors/internchaterrorresponse.d.ts +31 -0
- package/esm/models/errors/internchaterrorresponse.js +35 -0
- package/esm/models/incompletedetails.d.ts +4 -4
- package/esm/models/incompletedetails.js +3 -4
- package/esm/models/index.d.ts +23 -0
- package/esm/models/index.js +23 -0
- package/esm/models/internapprovalmode.d.ts +16 -0
- package/esm/models/internapprovalmode.js +15 -0
- package/esm/models/internchatassistantmessage.d.ts +24 -0
- package/esm/models/internchatassistantmessage.js +22 -0
- package/esm/models/internchatchoice.d.ts +37 -0
- package/esm/models/internchatchoice.js +33 -0
- package/esm/models/internchatcompletionchunk.d.ts +48 -0
- package/esm/models/internchatcompletionchunk.js +34 -0
- package/esm/models/internchatcompletionrequest.d.ts +40 -0
- package/esm/models/internchatcompletionrequest.js +25 -0
- package/esm/models/internchatdelta.d.ts +24 -0
- package/esm/models/internchatdelta.js +28 -0
- package/esm/models/internchatdevelopermessage.d.ts +21 -0
- package/esm/models/internchatdevelopermessage.js +15 -0
- package/esm/models/internchatechoedtoolcall.d.ts +21 -0
- package/esm/models/internchatechoedtoolcall.js +15 -0
- package/esm/models/internchatechoedtoolcallfunction.d.ts +17 -0
- package/esm/models/internchatechoedtoolcallfunction.js +14 -0
- package/esm/models/internchaterror.d.ts +22 -0
- package/esm/models/internchaterror.js +17 -0
- package/esm/models/internchaterrormetadata.d.ts +44 -0
- package/esm/models/internchaterrormetadata.js +38 -0
- package/esm/models/internchatmessage.d.ts +16 -0
- package/esm/models/internchatmessage.js +22 -0
- package/esm/models/internchatmessagecontent.d.ts +12 -0
- package/esm/models/internchatmessagecontent.js +12 -0
- package/esm/models/internchatprompttokensdetails.d.ts +13 -0
- package/esm/models/internchatprompttokensdetails.js +19 -0
- package/esm/models/internchatstreamerror.d.ts +22 -0
- package/esm/models/internchatstreamerror.js +17 -0
- package/esm/models/internchatstreamingresponse.d.ts +17 -0
- package/esm/models/internchatstreamingresponse.js +29 -0
- package/esm/models/internchatsystemmessage.d.ts +21 -0
- package/esm/models/internchatsystemmessage.js +15 -0
- package/esm/models/internchattextpart.d.ts +24 -0
- package/esm/models/internchattextpart.js +19 -0
- package/esm/models/internchattoolcall.d.ts +30 -0
- package/esm/models/internchattoolcall.js +23 -0
- package/esm/models/internchattoolcallfunction.d.ts +24 -0
- package/esm/models/internchattoolcallfunction.js +20 -0
- package/esm/models/internchattoolmessage.d.ts +23 -0
- package/esm/models/internchattoolmessage.js +21 -0
- package/esm/models/internchatusage.d.ts +24 -0
- package/esm/models/internchatusage.js +27 -0
- package/esm/models/internchatusermessage.d.ts +21 -0
- package/esm/models/internchatusermessage.js +15 -0
- package/esm/models/operations/createinternchatcompletion.d.ts +61 -0
- package/esm/models/operations/createinternchatcompletion.js +24 -0
- package/esm/models/operations/index.d.ts +1 -0
- package/esm/models/operations/index.js +1 -0
- package/esm/sdk/interns.d.ts +20 -0
- package/esm/sdk/interns.js +22 -0
- package/jsr.json +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { OpenRouterCore } from "../core.js";
|
|
2
|
+
import { EventStream } from "../lib/event-streams.js";
|
|
3
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
4
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
5
|
+
import * as errors from "../models/errors/index.js";
|
|
6
|
+
import { OpenRouterError } from "../models/errors/openroutererror.js";
|
|
7
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
8
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
9
|
+
import * as models from "../models/index.js";
|
|
10
|
+
import * as operations from "../models/operations/index.js";
|
|
11
|
+
import { APIPromise } from "../types/async.js";
|
|
12
|
+
import { Result } from "../types/fp.js";
|
|
13
|
+
/**
|
|
14
|
+
* Stream a chat completion with an intern
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* Sends a prompt to one of your interns and streams the reply as OpenAI-compatible server-sent events ending with `[DONE]`. The run executes on the intern, which may pause to ask you something. It then streams one `openrouter.provide_input` tool call and finishes with `finish_reason: "tool_calls"`, and the run stays open on the intern.
|
|
18
|
+
*
|
|
19
|
+
* Every response, whether it ends with `stop`, `tool_calls` or `error`, is followed by a final chunk with empty `choices` that carries `session_id`, then `data: [DONE]`. That chunk carries the `usage` the intern reported for the run, after `stop` or `error`, and `null` when the intern reported none. After `tool_calls` its `usage` is `null` because the turn is not over. Read through `[DONE]`: the `session_id` you need to reply arrives after the `tool_calls` finish chunk.
|
|
20
|
+
*
|
|
21
|
+
* To answer, send a second request with the same `session_id`, the assistant message echoing that tool call, and a `tool` message whose `tool_call_id` is the tool call id and whose `content` is the answer. The answer is delivered to the run that asked and the stream continues from where it paused. A question stays open for its interaction deadline (5 minutes by default) and the run is cancelled when that passes. Rejected replies do not extend the deadline.
|
|
22
|
+
*
|
|
23
|
+
* Closing the connection after the `[DONE]` that follows `finish_reason: "tool_calls"` keeps the run alive. Disconnecting while a response is still streaming cancels the run. The disconnect is noticed when the intern next writes to the stream, which during a silent tool run can take more than one 30 second heartbeat interval.
|
|
24
|
+
*
|
|
25
|
+
* A run the intern ends while you are still connected, by cancellation or by a deadline, ends the stream with a `finish_reason: "error"` chunk carrying `410` and reason `run_ended`, then the final empty-`choices` chunk and `[DONE]`. That error reports only an ending the intern confirmed. A connection that breaks without that confirmation ends with reason `stream_severed`, and a client that has already disconnected is promised no final event.
|
|
26
|
+
*
|
|
27
|
+
* Set `approval_mode` to `manual` to have the intern ask before approval-bearing tools such as the shell. Omitted, the run self-drives and consents on your behalf. The mode belongs to the run started by that prompt and must be repeated on later prompts.
|
|
28
|
+
*
|
|
29
|
+
* Available to interns programme members. Callers outside the programme receive `404` for every path under `/api/v1/interns`.
|
|
30
|
+
*
|
|
31
|
+
* If set, this operation will use {@link Security.apiKey} from the global security.
|
|
32
|
+
*/
|
|
33
|
+
export declare function internsChat(client: OpenRouterCore, request: operations.CreateInternChatCompletionRequest, options?: RequestOptions): APIPromise<Result<EventStream<models.InternChatCompletionChunk>, errors.InternChatErrorResponse | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
34
|
+
//# sourceMappingURL=internsChat.d.ts.map
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 36149dc7ea8d
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { EventStream } from "../lib/event-streams.js";
|
|
8
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
9
|
+
import * as M from "../lib/matchers.js";
|
|
10
|
+
import { compactMap } from "../lib/primitives.js";
|
|
11
|
+
import { safeParse } from "../lib/schemas.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import * as errors from "../models/errors/index.js";
|
|
15
|
+
import * as models from "../models/index.js";
|
|
16
|
+
import * as operations from "../models/operations/index.js";
|
|
17
|
+
import { APIPromise } from "../types/async.js";
|
|
18
|
+
/**
|
|
19
|
+
* Stream a chat completion with an intern
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* Sends a prompt to one of your interns and streams the reply as OpenAI-compatible server-sent events ending with `[DONE]`. The run executes on the intern, which may pause to ask you something. It then streams one `openrouter.provide_input` tool call and finishes with `finish_reason: "tool_calls"`, and the run stays open on the intern.
|
|
23
|
+
*
|
|
24
|
+
* Every response, whether it ends with `stop`, `tool_calls` or `error`, is followed by a final chunk with empty `choices` that carries `session_id`, then `data: [DONE]`. That chunk carries the `usage` the intern reported for the run, after `stop` or `error`, and `null` when the intern reported none. After `tool_calls` its `usage` is `null` because the turn is not over. Read through `[DONE]`: the `session_id` you need to reply arrives after the `tool_calls` finish chunk.
|
|
25
|
+
*
|
|
26
|
+
* To answer, send a second request with the same `session_id`, the assistant message echoing that tool call, and a `tool` message whose `tool_call_id` is the tool call id and whose `content` is the answer. The answer is delivered to the run that asked and the stream continues from where it paused. A question stays open for its interaction deadline (5 minutes by default) and the run is cancelled when that passes. Rejected replies do not extend the deadline.
|
|
27
|
+
*
|
|
28
|
+
* Closing the connection after the `[DONE]` that follows `finish_reason: "tool_calls"` keeps the run alive. Disconnecting while a response is still streaming cancels the run. The disconnect is noticed when the intern next writes to the stream, which during a silent tool run can take more than one 30 second heartbeat interval.
|
|
29
|
+
*
|
|
30
|
+
* A run the intern ends while you are still connected, by cancellation or by a deadline, ends the stream with a `finish_reason: "error"` chunk carrying `410` and reason `run_ended`, then the final empty-`choices` chunk and `[DONE]`. That error reports only an ending the intern confirmed. A connection that breaks without that confirmation ends with reason `stream_severed`, and a client that has already disconnected is promised no final event.
|
|
31
|
+
*
|
|
32
|
+
* Set `approval_mode` to `manual` to have the intern ask before approval-bearing tools such as the shell. Omitted, the run self-drives and consents on your behalf. The mode belongs to the run started by that prompt and must be repeated on later prompts.
|
|
33
|
+
*
|
|
34
|
+
* Available to interns programme members. Callers outside the programme receive `404` for every path under `/api/v1/interns`.
|
|
35
|
+
*
|
|
36
|
+
* If set, this operation will use {@link Security.apiKey} from the global security.
|
|
37
|
+
*/
|
|
38
|
+
export function internsChat(client, request, options) {
|
|
39
|
+
return new APIPromise($do(client, request, options));
|
|
40
|
+
}
|
|
41
|
+
async function $do(client, request, options) {
|
|
42
|
+
const parsed = safeParse(request, (value) => operations.CreateInternChatCompletionRequest$outboundSchema.parse(value), "Input validation failed");
|
|
43
|
+
if (!parsed.ok) {
|
|
44
|
+
return [parsed, { status: "invalid" }];
|
|
45
|
+
}
|
|
46
|
+
const payload = parsed.value;
|
|
47
|
+
const body = encodeJSON("body", payload.InternChatCompletionRequest, {
|
|
48
|
+
explode: true,
|
|
49
|
+
});
|
|
50
|
+
const pathParams = {
|
|
51
|
+
internId: encodeSimple("internId", payload.internId, {
|
|
52
|
+
explode: false,
|
|
53
|
+
charEncoding: "percent",
|
|
54
|
+
}),
|
|
55
|
+
};
|
|
56
|
+
const path = pathToFunc("/interns/{internId}/chat/completions")(pathParams);
|
|
57
|
+
const headers = new Headers(compactMap({
|
|
58
|
+
"Content-Type": "application/json",
|
|
59
|
+
Accept: "text/event-stream",
|
|
60
|
+
"HTTP-Referer": encodeSimple("HTTP-Referer", payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
|
|
61
|
+
"X-OpenRouter-Categories": encodeSimple("X-OpenRouter-Categories", payload.appCategories ?? client._options.appCategories, { explode: false, charEncoding: "none" }),
|
|
62
|
+
"X-OpenRouter-Title": encodeSimple("X-OpenRouter-Title", payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }),
|
|
63
|
+
}));
|
|
64
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
65
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
66
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
67
|
+
const context = {
|
|
68
|
+
options: client._options,
|
|
69
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
70
|
+
operationID: "createInternChatCompletion",
|
|
71
|
+
oAuth2Scopes: null,
|
|
72
|
+
resolvedSecurity: requestSecurity,
|
|
73
|
+
securitySource: client._options.apiKey,
|
|
74
|
+
retryConfig: options?.retries
|
|
75
|
+
|| client._options.retryConfig
|
|
76
|
+
|| {
|
|
77
|
+
strategy: "backoff",
|
|
78
|
+
backoff: {
|
|
79
|
+
initialInterval: 500,
|
|
80
|
+
maxInterval: 60000,
|
|
81
|
+
exponent: 1.5,
|
|
82
|
+
maxElapsedTime: 3600000,
|
|
83
|
+
},
|
|
84
|
+
retryConnectionErrors: true,
|
|
85
|
+
}
|
|
86
|
+
|| { strategy: "none" },
|
|
87
|
+
retryCodes: options?.retryCodes || ["5XX"],
|
|
88
|
+
};
|
|
89
|
+
const requestRes = client._createRequest(context, {
|
|
90
|
+
security: requestSecurity,
|
|
91
|
+
method: "POST",
|
|
92
|
+
baseURL: options?.serverURL,
|
|
93
|
+
path: path,
|
|
94
|
+
headers: headers,
|
|
95
|
+
body: body,
|
|
96
|
+
userAgent: client._options.userAgent,
|
|
97
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
98
|
+
}, options);
|
|
99
|
+
if (!requestRes.ok) {
|
|
100
|
+
return [requestRes, { status: "invalid" }];
|
|
101
|
+
}
|
|
102
|
+
const req = requestRes.value;
|
|
103
|
+
const doResult = await client._do(req, {
|
|
104
|
+
context,
|
|
105
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
106
|
+
retryConfig: context.retryConfig,
|
|
107
|
+
retryCodes: context.retryCodes,
|
|
108
|
+
});
|
|
109
|
+
if (!doResult.ok) {
|
|
110
|
+
return [doResult, { status: "request-error", request: req }];
|
|
111
|
+
}
|
|
112
|
+
const response = doResult.value;
|
|
113
|
+
const responseFields = {
|
|
114
|
+
HttpMeta: { Response: response, Request: req },
|
|
115
|
+
};
|
|
116
|
+
const [result] = await M.match(M.sse(200, z.custom(x => x instanceof ReadableStream)
|
|
117
|
+
.transform(stream => {
|
|
118
|
+
return new EventStream(stream, rawEvent => {
|
|
119
|
+
if (rawEvent.data === "[DONE]") {
|
|
120
|
+
return { done: true, value: undefined };
|
|
121
|
+
}
|
|
122
|
+
return {
|
|
123
|
+
done: false,
|
|
124
|
+
value: models.InternChatStreamingResponse$inboundSchema.parse(rawEvent)?.data,
|
|
125
|
+
};
|
|
126
|
+
});
|
|
127
|
+
})), M.jsonErr([400, 401, 403, 404, 409, 410, 413, 429], errors.InternChatErrorResponse$inboundSchema), M.jsonErr([502, 503, 504], errors.InternChatErrorResponse$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
128
|
+
if (!result.ok) {
|
|
129
|
+
return [result, { status: "complete", request: req, response }];
|
|
130
|
+
}
|
|
131
|
+
return [result, { status: "complete", request: req, response }];
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=internsChat.js.map
|
package/esm/lib/config.d.ts
CHANGED
|
@@ -50,8 +50,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
50
50
|
export declare const SDK_METADATA: {
|
|
51
51
|
readonly language: "typescript";
|
|
52
52
|
readonly openapiDocVersion: "1.0.0";
|
|
53
|
-
readonly sdkVersion: "1.2.
|
|
53
|
+
readonly sdkVersion: "1.2.137";
|
|
54
54
|
readonly genVersion: "2.914.0";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.2.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.2.137 2.914.0 1.0.0 @openrouter/sdk";
|
|
56
56
|
};
|
|
57
57
|
//# sourceMappingURL=config.d.ts.map
|
package/esm/lib/config.js
CHANGED
|
@@ -29,8 +29,8 @@ export function serverURLFromOptions(options) {
|
|
|
29
29
|
export const SDK_METADATA = {
|
|
30
30
|
language: "typescript",
|
|
31
31
|
openapiDocVersion: "1.0.0",
|
|
32
|
-
sdkVersion: "1.2.
|
|
32
|
+
sdkVersion: "1.2.137",
|
|
33
33
|
genVersion: "2.914.0",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.2.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.2.137 2.914.0 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -7,6 +7,7 @@ export * from "./gatewaytimeoutresponseerror.js";
|
|
|
7
7
|
export * from "./goneresponseerror.js";
|
|
8
8
|
export * from "./httpclienterrors.js";
|
|
9
9
|
export * from "./internalserverresponseerror.js";
|
|
10
|
+
export * from "./internchaterrorresponse.js";
|
|
10
11
|
export * from "./internlifecycleerror.js";
|
|
11
12
|
export * from "./notfoundresponseerror.js";
|
|
12
13
|
export * from "./oautherrorresponse.js";
|
|
@@ -11,6 +11,7 @@ export * from "./gatewaytimeoutresponseerror.js";
|
|
|
11
11
|
export * from "./goneresponseerror.js";
|
|
12
12
|
export * from "./httpclienterrors.js";
|
|
13
13
|
export * from "./internalserverresponseerror.js";
|
|
14
|
+
export * from "./internchaterrorresponse.js";
|
|
14
15
|
export * from "./internlifecycleerror.js";
|
|
15
16
|
export * from "./notfoundresponseerror.js";
|
|
16
17
|
export * from "./oautherrorresponse.js";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import * as models from "../index.js";
|
|
3
|
+
import { OpenRouterError } from "./openroutererror.js";
|
|
4
|
+
/**
|
|
5
|
+
* A refusal before the stream opens. Once the response is `200` and streaming, failures arrive as a chunk with `finish_reason: "error"` instead.
|
|
6
|
+
*/
|
|
7
|
+
export type InternChatErrorResponseData = {
|
|
8
|
+
/**
|
|
9
|
+
* The OpenAI-compatible error object. `metadata` is present on refusals from the chat route. Authentication refusals (`401`), the departed-creator `403` and the programme `404` carry only `code` and `message`.
|
|
10
|
+
*/
|
|
11
|
+
error: models.InternChatError;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* A refusal before the stream opens. Once the response is `200` and streaming, failures arrive as a chunk with `finish_reason: "error"` instead.
|
|
15
|
+
*/
|
|
16
|
+
export declare class InternChatErrorResponse extends OpenRouterError {
|
|
17
|
+
/**
|
|
18
|
+
* The OpenAI-compatible error object. `metadata` is present on refusals from the chat route. Authentication refusals (`401`), the departed-creator `403` and the programme `404` carry only `code` and `message`.
|
|
19
|
+
*/
|
|
20
|
+
error: models.InternChatError;
|
|
21
|
+
/** The original data that was passed to this error instance. */
|
|
22
|
+
data$: InternChatErrorResponseData;
|
|
23
|
+
constructor(err: InternChatErrorResponseData, httpMeta: {
|
|
24
|
+
response: Response;
|
|
25
|
+
request: Request;
|
|
26
|
+
body: string;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/** @internal */
|
|
30
|
+
export declare const InternChatErrorResponse$inboundSchema: z.ZodType<InternChatErrorResponse, unknown>;
|
|
31
|
+
//# sourceMappingURL=internchaterrorresponse.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: bb73eae2fe73
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import * as models from "../index.js";
|
|
7
|
+
import { OpenRouterError } from "./openroutererror.js";
|
|
8
|
+
/**
|
|
9
|
+
* A refusal before the stream opens. Once the response is `200` and streaming, failures arrive as a chunk with `finish_reason: "error"` instead.
|
|
10
|
+
*/
|
|
11
|
+
export class InternChatErrorResponse extends OpenRouterError {
|
|
12
|
+
constructor(err, httpMeta) {
|
|
13
|
+
const message = err.error?.message
|
|
14
|
+
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
15
|
+
super(message, httpMeta);
|
|
16
|
+
this.data$ = err;
|
|
17
|
+
this.error = err.error;
|
|
18
|
+
this.name = "InternChatErrorResponse";
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const InternChatErrorResponse$inboundSchema = z.object({
|
|
23
|
+
error: models.InternChatError$inboundSchema,
|
|
24
|
+
request$: z.custom(x => x instanceof Request),
|
|
25
|
+
response$: z.custom(x => x instanceof Response),
|
|
26
|
+
body$: z.string(),
|
|
27
|
+
})
|
|
28
|
+
.transform((v) => {
|
|
29
|
+
return new InternChatErrorResponse(v, {
|
|
30
|
+
request: v.request$,
|
|
31
|
+
response: v.response$,
|
|
32
|
+
body: v.body$,
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=internchaterrorresponse.js.map
|
|
@@ -2,16 +2,16 @@ import * as z from "zod/v4";
|
|
|
2
2
|
import { OpenEnum } from "../types/enums.js";
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const IncompleteDetailsReason: {
|
|
6
6
|
readonly MaxOutputTokens: "max_output_tokens";
|
|
7
7
|
readonly ContentFilter: "content_filter";
|
|
8
8
|
};
|
|
9
|
-
export type
|
|
9
|
+
export type IncompleteDetailsReason = OpenEnum<typeof IncompleteDetailsReason>;
|
|
10
10
|
export type IncompleteDetails = {
|
|
11
|
-
reason?:
|
|
11
|
+
reason?: IncompleteDetailsReason | undefined;
|
|
12
12
|
};
|
|
13
13
|
/** @internal */
|
|
14
|
-
export declare const
|
|
14
|
+
export declare const IncompleteDetailsReason$inboundSchema: z.ZodType<IncompleteDetailsReason, unknown>;
|
|
15
15
|
/** @internal */
|
|
16
16
|
export declare const IncompleteDetails$inboundSchema: z.ZodType<IncompleteDetails, unknown>;
|
|
17
17
|
export declare function incompleteDetailsFromJSON(jsonString: string): SafeParseResult<IncompleteDetails, SDKValidationError>;
|
|
@@ -5,16 +5,15 @@
|
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
7
|
import * as openEnums from "../types/enums.js";
|
|
8
|
-
export const
|
|
8
|
+
export const IncompleteDetailsReason = {
|
|
9
9
|
MaxOutputTokens: "max_output_tokens",
|
|
10
10
|
ContentFilter: "content_filter",
|
|
11
11
|
};
|
|
12
12
|
/** @internal */
|
|
13
|
-
export const
|
|
14
|
-
.inboundSchema(Reason);
|
|
13
|
+
export const IncompleteDetailsReason$inboundSchema = openEnums.inboundSchema(IncompleteDetailsReason);
|
|
15
14
|
/** @internal */
|
|
16
15
|
export const IncompleteDetails$inboundSchema = z.object({
|
|
17
|
-
reason:
|
|
16
|
+
reason: IncompleteDetailsReason$inboundSchema.optional(),
|
|
18
17
|
});
|
|
19
18
|
export function incompleteDetailsFromJSON(jsonString) {
|
|
20
19
|
return safeParse(jsonString, (x) => IncompleteDetails$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IncompleteDetails' from JSON`);
|
package/esm/models/index.d.ts
CHANGED
|
@@ -308,6 +308,29 @@ export * from "./inputvideo.js";
|
|
|
308
308
|
export * from "./instructtype.js";
|
|
309
309
|
export * from "./intern.js";
|
|
310
310
|
export * from "./internalserverresponseerrordata.js";
|
|
311
|
+
export * from "./internapprovalmode.js";
|
|
312
|
+
export * from "./internchatassistantmessage.js";
|
|
313
|
+
export * from "./internchatchoice.js";
|
|
314
|
+
export * from "./internchatcompletionchunk.js";
|
|
315
|
+
export * from "./internchatcompletionrequest.js";
|
|
316
|
+
export * from "./internchatdelta.js";
|
|
317
|
+
export * from "./internchatdevelopermessage.js";
|
|
318
|
+
export * from "./internchatechoedtoolcall.js";
|
|
319
|
+
export * from "./internchatechoedtoolcallfunction.js";
|
|
320
|
+
export * from "./internchaterror.js";
|
|
321
|
+
export * from "./internchaterrormetadata.js";
|
|
322
|
+
export * from "./internchatmessage.js";
|
|
323
|
+
export * from "./internchatmessagecontent.js";
|
|
324
|
+
export * from "./internchatprompttokensdetails.js";
|
|
325
|
+
export * from "./internchatstreamerror.js";
|
|
326
|
+
export * from "./internchatstreamingresponse.js";
|
|
327
|
+
export * from "./internchatsystemmessage.js";
|
|
328
|
+
export * from "./internchattextpart.js";
|
|
329
|
+
export * from "./internchattoolcall.js";
|
|
330
|
+
export * from "./internchattoolcallfunction.js";
|
|
331
|
+
export * from "./internchattoolmessage.js";
|
|
332
|
+
export * from "./internchatusage.js";
|
|
333
|
+
export * from "./internchatusermessage.js";
|
|
311
334
|
export * from "./internlifecycleerror.js";
|
|
312
335
|
export * from "./internlistresponse.js";
|
|
313
336
|
export * from "./itemreferenceitem.js";
|
package/esm/models/index.js
CHANGED
|
@@ -312,6 +312,29 @@ export * from "./inputvideo.js";
|
|
|
312
312
|
export * from "./instructtype.js";
|
|
313
313
|
export * from "./intern.js";
|
|
314
314
|
export * from "./internalserverresponseerrordata.js";
|
|
315
|
+
export * from "./internapprovalmode.js";
|
|
316
|
+
export * from "./internchatassistantmessage.js";
|
|
317
|
+
export * from "./internchatchoice.js";
|
|
318
|
+
export * from "./internchatcompletionchunk.js";
|
|
319
|
+
export * from "./internchatcompletionrequest.js";
|
|
320
|
+
export * from "./internchatdelta.js";
|
|
321
|
+
export * from "./internchatdevelopermessage.js";
|
|
322
|
+
export * from "./internchatechoedtoolcall.js";
|
|
323
|
+
export * from "./internchatechoedtoolcallfunction.js";
|
|
324
|
+
export * from "./internchaterror.js";
|
|
325
|
+
export * from "./internchaterrormetadata.js";
|
|
326
|
+
export * from "./internchatmessage.js";
|
|
327
|
+
export * from "./internchatmessagecontent.js";
|
|
328
|
+
export * from "./internchatprompttokensdetails.js";
|
|
329
|
+
export * from "./internchatstreamerror.js";
|
|
330
|
+
export * from "./internchatstreamingresponse.js";
|
|
331
|
+
export * from "./internchatsystemmessage.js";
|
|
332
|
+
export * from "./internchattextpart.js";
|
|
333
|
+
export * from "./internchattoolcall.js";
|
|
334
|
+
export * from "./internchattoolcallfunction.js";
|
|
335
|
+
export * from "./internchattoolmessage.js";
|
|
336
|
+
export * from "./internchatusage.js";
|
|
337
|
+
export * from "./internchatusermessage.js";
|
|
315
338
|
export * from "./internlifecycleerror.js";
|
|
316
339
|
export * from "./internlistresponse.js";
|
|
317
340
|
export * from "./itemreferenceitem.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
/**
|
|
4
|
+
* How the run started by this prompt handles tool approvals. `self-drive` (the default when omitted) consents on your behalf and runs the shell unsandboxed. `manual` asks you before an approval-bearing tool runs, as an `openrouter.provide_input` permission request, and keeps the shell sandboxed until an escalation is allowed. The mode applies to the run this prompt starts and is not remembered by the session. Repeat it on each new prompt that should use it. A `tool` reply continues the run under the mode it started with.
|
|
5
|
+
*/
|
|
6
|
+
export declare const InternApprovalMode: {
|
|
7
|
+
readonly Manual: "manual";
|
|
8
|
+
readonly SelfDrive: "self-drive";
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* How the run started by this prompt handles tool approvals. `self-drive` (the default when omitted) consents on your behalf and runs the shell unsandboxed. `manual` asks you before an approval-bearing tool runs, as an `openrouter.provide_input` permission request, and keeps the shell sandboxed until an escalation is allowed. The mode applies to the run this prompt starts and is not remembered by the session. Repeat it on each new prompt that should use it. A `tool` reply continues the run under the mode it started with.
|
|
12
|
+
*/
|
|
13
|
+
export type InternApprovalMode = OpenEnum<typeof InternApprovalMode>;
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const InternApprovalMode$outboundSchema: z.ZodType<string, InternApprovalMode>;
|
|
16
|
+
//# sourceMappingURL=internapprovalmode.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: cccfde70a06c
|
|
4
|
+
*/
|
|
5
|
+
import * as openEnums from "../types/enums.js";
|
|
6
|
+
/**
|
|
7
|
+
* How the run started by this prompt handles tool approvals. `self-drive` (the default when omitted) consents on your behalf and runs the shell unsandboxed. `manual` asks you before an approval-bearing tool runs, as an `openrouter.provide_input` permission request, and keeps the shell sandboxed until an escalation is allowed. The mode applies to the run this prompt starts and is not remembered by the session. Repeat it on each new prompt that should use it. A `tool` reply continues the run under the mode it started with.
|
|
8
|
+
*/
|
|
9
|
+
export const InternApprovalMode = {
|
|
10
|
+
Manual: "manual",
|
|
11
|
+
SelfDrive: "self-drive",
|
|
12
|
+
};
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const InternApprovalMode$outboundSchema = openEnums.outboundSchema(InternApprovalMode);
|
|
15
|
+
//# sourceMappingURL=internapprovalmode.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { InternChatEchoedToolCall, InternChatEchoedToolCall$Outbound } from "./internchatechoedtoolcall.js";
|
|
3
|
+
import { InternChatMessageContent, InternChatMessageContent$Outbound } from "./internchatmessagecontent.js";
|
|
4
|
+
/**
|
|
5
|
+
* An assistant message from an earlier response. When answering an interaction, echo the streamed `tool_calls` here before the `tool` message.
|
|
6
|
+
*/
|
|
7
|
+
export type InternChatAssistantMessage = {
|
|
8
|
+
/**
|
|
9
|
+
* Message text as a string or a list of text parts. Assistant history may carry null. Only the last message is read; earlier messages are accepted so ordinary clients can resend history.
|
|
10
|
+
*/
|
|
11
|
+
content: InternChatMessageContent | null;
|
|
12
|
+
role: "assistant";
|
|
13
|
+
toolCalls?: Array<InternChatEchoedToolCall> | undefined;
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export type InternChatAssistantMessage$Outbound = {
|
|
17
|
+
content: InternChatMessageContent$Outbound | null;
|
|
18
|
+
role: "assistant";
|
|
19
|
+
tool_calls?: Array<InternChatEchoedToolCall$Outbound> | undefined;
|
|
20
|
+
};
|
|
21
|
+
/** @internal */
|
|
22
|
+
export declare const InternChatAssistantMessage$outboundSchema: z.ZodType<InternChatAssistantMessage$Outbound, InternChatAssistantMessage>;
|
|
23
|
+
export declare function internChatAssistantMessageToJSON(internChatAssistantMessage: InternChatAssistantMessage): string;
|
|
24
|
+
//# sourceMappingURL=internchatassistantmessage.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: db891c763d46
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { InternChatEchoedToolCall$outboundSchema, } from "./internchatechoedtoolcall.js";
|
|
8
|
+
import { InternChatMessageContent$outboundSchema, } from "./internchatmessagecontent.js";
|
|
9
|
+
/** @internal */
|
|
10
|
+
export const InternChatAssistantMessage$outboundSchema = z.object({
|
|
11
|
+
content: z.nullable(InternChatMessageContent$outboundSchema),
|
|
12
|
+
role: z.literal("assistant"),
|
|
13
|
+
toolCalls: z.array(InternChatEchoedToolCall$outboundSchema).optional(),
|
|
14
|
+
}).transform((v) => {
|
|
15
|
+
return remap$(v, {
|
|
16
|
+
toolCalls: "tool_calls",
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
export function internChatAssistantMessageToJSON(internChatAssistantMessage) {
|
|
20
|
+
return JSON.stringify(InternChatAssistantMessage$outboundSchema.parse(internChatAssistantMessage));
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=internchatassistantmessage.js.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
import { InternChatDelta } from "./internchatdelta.js";
|
|
6
|
+
/**
|
|
7
|
+
* `null` while streaming. `stop` when the run completed, `tool_calls` when the run is waiting for the caller to answer the streamed tool call, `error` on the terminal error chunk.
|
|
8
|
+
*/
|
|
9
|
+
export declare const FinishReason: {
|
|
10
|
+
readonly Error: "error";
|
|
11
|
+
readonly Stop: "stop";
|
|
12
|
+
readonly ToolCalls: "tool_calls";
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* `null` while streaming. `stop` when the run completed, `tool_calls` when the run is waiting for the caller to answer the streamed tool call, `error` on the terminal error chunk.
|
|
16
|
+
*/
|
|
17
|
+
export type FinishReason = OpenEnum<typeof FinishReason>;
|
|
18
|
+
/**
|
|
19
|
+
* The single choice this endpoint streams.
|
|
20
|
+
*/
|
|
21
|
+
export type InternChatChoice = {
|
|
22
|
+
/**
|
|
23
|
+
* The incremental content of one chunk. The first chunk carries `role`, text chunks carry `content`, reasoning chunks carry `reasoning`, and an interaction chunk carries one complete `tool_calls` entry.
|
|
24
|
+
*/
|
|
25
|
+
delta: InternChatDelta;
|
|
26
|
+
/**
|
|
27
|
+
* `null` while streaming. `stop` when the run completed, `tool_calls` when the run is waiting for the caller to answer the streamed tool call, `error` on the terminal error chunk.
|
|
28
|
+
*/
|
|
29
|
+
finishReason: FinishReason | null;
|
|
30
|
+
index: number;
|
|
31
|
+
};
|
|
32
|
+
/** @internal */
|
|
33
|
+
export declare const FinishReason$inboundSchema: z.ZodType<FinishReason, unknown>;
|
|
34
|
+
/** @internal */
|
|
35
|
+
export declare const InternChatChoice$inboundSchema: z.ZodType<InternChatChoice, unknown>;
|
|
36
|
+
export declare function internChatChoiceFromJSON(jsonString: string): SafeParseResult<InternChatChoice, SDKValidationError>;
|
|
37
|
+
//# sourceMappingURL=internchatchoice.d.ts.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: f10a43356b30
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import * as openEnums from "../types/enums.js";
|
|
9
|
+
import { InternChatDelta$inboundSchema, } from "./internchatdelta.js";
|
|
10
|
+
/**
|
|
11
|
+
* `null` while streaming. `stop` when the run completed, `tool_calls` when the run is waiting for the caller to answer the streamed tool call, `error` on the terminal error chunk.
|
|
12
|
+
*/
|
|
13
|
+
export const FinishReason = {
|
|
14
|
+
Error: "error",
|
|
15
|
+
Stop: "stop",
|
|
16
|
+
ToolCalls: "tool_calls",
|
|
17
|
+
};
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const FinishReason$inboundSchema = openEnums.inboundSchema(FinishReason);
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const InternChatChoice$inboundSchema = z.object({
|
|
22
|
+
delta: InternChatDelta$inboundSchema,
|
|
23
|
+
finish_reason: z.nullable(FinishReason$inboundSchema),
|
|
24
|
+
index: z.int(),
|
|
25
|
+
}).transform((v) => {
|
|
26
|
+
return remap$(v, {
|
|
27
|
+
"finish_reason": "finishReason",
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
export function internChatChoiceFromJSON(jsonString) {
|
|
31
|
+
return safeParse(jsonString, (x) => InternChatChoice$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InternChatChoice' from JSON`);
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=internchatchoice.js.map
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
import { InternChatChoice } from "./internchatchoice.js";
|
|
6
|
+
import { InternChatStreamError } from "./internchatstreamerror.js";
|
|
7
|
+
import { InternChatUsage } from "./internchatusage.js";
|
|
8
|
+
export declare const InternChatCompletionChunkObject: {
|
|
9
|
+
readonly ChatCompletionChunk: "chat.completion.chunk";
|
|
10
|
+
};
|
|
11
|
+
export type InternChatCompletionChunkObject = ClosedEnum<typeof InternChatCompletionChunkObject>;
|
|
12
|
+
/**
|
|
13
|
+
* One `data:` line of the stream. A run streams a role chunk, content and reasoning chunks, then a finish chunk: `stop`, `tool_calls` (the run is paused for input) or `error` (with an `error` object). A final chunk with empty `choices` follows in every case, carrying `session_id` and `usage` (`null` unless the daemon reported usage, and always `null` after `tool_calls`). Every stream ends with `[DONE]`.
|
|
14
|
+
*/
|
|
15
|
+
export type InternChatCompletionChunk = {
|
|
16
|
+
/**
|
|
17
|
+
* One choice on content, tool-call and error chunks. Empty on the final chunk that carries `session_id`.
|
|
18
|
+
*/
|
|
19
|
+
choices: Array<InternChatChoice>;
|
|
20
|
+
created: number;
|
|
21
|
+
/**
|
|
22
|
+
* A failure after the response headers were sent. The chunk that carries it has `finish_reason: "error"`, then the final empty-`choices` chunk and `[DONE]` follow. Reasons here are `attachment_failed`, `busy`, `client_closed_request`, `interaction_not_pending`, `interaction_unknown`, `intern_unreachable`, `run_ended`, `stream_severed`, `timeout` or `turn_failed`. `run_ended` reports an ending the intern confirmed, such as a cancellation or a deadline, while `stream_severed` reports a connection lost without that confirmation.
|
|
23
|
+
*/
|
|
24
|
+
error?: InternChatStreamError | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* The completion id, constant for the whole response.
|
|
27
|
+
*/
|
|
28
|
+
id: string;
|
|
29
|
+
/**
|
|
30
|
+
* The request `model` when given, or `openrouter/intern`. The final chunk may carry the model the intern reported for the run instead.
|
|
31
|
+
*/
|
|
32
|
+
model: string;
|
|
33
|
+
object: InternChatCompletionChunkObject;
|
|
34
|
+
/**
|
|
35
|
+
* On the final chunk of every response, the daemon session to continue with, or `null` when the run failed before the intern reported one. Send it as `session_id` on the next request, including the `tool` reply to an interaction.
|
|
36
|
+
*/
|
|
37
|
+
sessionId?: string | null | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Token usage for the run as the daemon reported it, on the final chunk before `[DONE]`. `null` when the daemon reported none, and always `null` after `tool_calls` because the turn is not over.
|
|
40
|
+
*/
|
|
41
|
+
usage?: InternChatUsage | null | undefined;
|
|
42
|
+
};
|
|
43
|
+
/** @internal */
|
|
44
|
+
export declare const InternChatCompletionChunkObject$inboundSchema: z.ZodEnum<typeof InternChatCompletionChunkObject>;
|
|
45
|
+
/** @internal */
|
|
46
|
+
export declare const InternChatCompletionChunk$inboundSchema: z.ZodType<InternChatCompletionChunk, unknown>;
|
|
47
|
+
export declare function internChatCompletionChunkFromJSON(jsonString: string): SafeParseResult<InternChatCompletionChunk, SDKValidationError>;
|
|
48
|
+
//# sourceMappingURL=internchatcompletionchunk.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 3492df914b61
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import { InternChatChoice$inboundSchema, } from "./internchatchoice.js";
|
|
9
|
+
import { InternChatStreamError$inboundSchema, } from "./internchatstreamerror.js";
|
|
10
|
+
import { InternChatUsage$inboundSchema, } from "./internchatusage.js";
|
|
11
|
+
export const InternChatCompletionChunkObject = {
|
|
12
|
+
ChatCompletionChunk: "chat.completion.chunk",
|
|
13
|
+
};
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const InternChatCompletionChunkObject$inboundSchema = z.enum(InternChatCompletionChunkObject);
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const InternChatCompletionChunk$inboundSchema = z.object({
|
|
18
|
+
choices: z.array(InternChatChoice$inboundSchema),
|
|
19
|
+
created: z.int(),
|
|
20
|
+
error: InternChatStreamError$inboundSchema.optional(),
|
|
21
|
+
id: z.string(),
|
|
22
|
+
model: z.string(),
|
|
23
|
+
object: InternChatCompletionChunkObject$inboundSchema,
|
|
24
|
+
session_id: z.nullable(z.string()).optional(),
|
|
25
|
+
usage: z.nullable(InternChatUsage$inboundSchema).optional(),
|
|
26
|
+
}).transform((v) => {
|
|
27
|
+
return remap$(v, {
|
|
28
|
+
"session_id": "sessionId",
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
export function internChatCompletionChunkFromJSON(jsonString) {
|
|
32
|
+
return safeParse(jsonString, (x) => InternChatCompletionChunk$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InternChatCompletionChunk' from JSON`);
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=internchatcompletionchunk.js.map
|