@t2000/sdk 8.0.0 → 8.0.1
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.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -17,7 +17,7 @@ interface ChatMessage {
|
|
|
17
17
|
interface ChatParams {
|
|
18
18
|
model: string;
|
|
19
19
|
messages: ChatMessage[];
|
|
20
|
-
/** Private
|
|
20
|
+
/** Private Inference key (`sk-…`). Falls back to `T2000_API_KEY` env. */
|
|
21
21
|
apiKey?: string;
|
|
22
22
|
/** Override the API base (default `api.t2000.ai/v1`; e.g. for testing). */
|
|
23
23
|
apiBase?: string;
|
|
@@ -58,7 +58,7 @@ declare function chatCompletion(params: ChatParams): Promise<ChatResult>;
|
|
|
58
58
|
declare function chatCompletionStream(params: ChatParams): AsyncGenerator<string, {
|
|
59
59
|
receiptId?: string;
|
|
60
60
|
}, unknown>;
|
|
61
|
-
/** List
|
|
61
|
+
/** List Private Inference model catalog (`GET /v1/models`). The key is sent when
|
|
62
62
|
* available but not required (the catalog may be public). */
|
|
63
63
|
declare function listModels(opts?: {
|
|
64
64
|
apiKey?: string;
|
|
@@ -276,14 +276,14 @@ declare class T2000 extends EventEmitter<T2000Events> {
|
|
|
276
276
|
/** Transaction signer (works for both keypair and zkLogin). */
|
|
277
277
|
get signer(): TransactionSigner;
|
|
278
278
|
pay(options: PayOptions): Promise<PayResult>;
|
|
279
|
-
/** Non-streaming chat completion against
|
|
279
|
+
/** Non-streaming chat completion against Private Inference. */
|
|
280
280
|
chat(params: ChatParams): Promise<ChatResult>;
|
|
281
281
|
/** Streaming chat completion — async-iterate the assistant text deltas;
|
|
282
282
|
* the generator returns `{ receiptId }` (confidential attestation) at the end. */
|
|
283
283
|
chatStream(params: ChatParams): AsyncGenerator<string, {
|
|
284
284
|
receiptId?: string;
|
|
285
285
|
}, unknown>;
|
|
286
|
-
/** The Private
|
|
286
|
+
/** The Private Inference model catalog (`GET /v1/models`). */
|
|
287
287
|
models(opts?: {
|
|
288
288
|
apiKey?: string;
|
|
289
289
|
apiBase?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ interface ChatMessage {
|
|
|
17
17
|
interface ChatParams {
|
|
18
18
|
model: string;
|
|
19
19
|
messages: ChatMessage[];
|
|
20
|
-
/** Private
|
|
20
|
+
/** Private Inference key (`sk-…`). Falls back to `T2000_API_KEY` env. */
|
|
21
21
|
apiKey?: string;
|
|
22
22
|
/** Override the API base (default `api.t2000.ai/v1`; e.g. for testing). */
|
|
23
23
|
apiBase?: string;
|
|
@@ -58,7 +58,7 @@ declare function chatCompletion(params: ChatParams): Promise<ChatResult>;
|
|
|
58
58
|
declare function chatCompletionStream(params: ChatParams): AsyncGenerator<string, {
|
|
59
59
|
receiptId?: string;
|
|
60
60
|
}, unknown>;
|
|
61
|
-
/** List
|
|
61
|
+
/** List Private Inference model catalog (`GET /v1/models`). The key is sent when
|
|
62
62
|
* available but not required (the catalog may be public). */
|
|
63
63
|
declare function listModels(opts?: {
|
|
64
64
|
apiKey?: string;
|
|
@@ -276,14 +276,14 @@ declare class T2000 extends EventEmitter<T2000Events> {
|
|
|
276
276
|
/** Transaction signer (works for both keypair and zkLogin). */
|
|
277
277
|
get signer(): TransactionSigner;
|
|
278
278
|
pay(options: PayOptions): Promise<PayResult>;
|
|
279
|
-
/** Non-streaming chat completion against
|
|
279
|
+
/** Non-streaming chat completion against Private Inference. */
|
|
280
280
|
chat(params: ChatParams): Promise<ChatResult>;
|
|
281
281
|
/** Streaming chat completion — async-iterate the assistant text deltas;
|
|
282
282
|
* the generator returns `{ receiptId }` (confidential attestation) at the end. */
|
|
283
283
|
chatStream(params: ChatParams): AsyncGenerator<string, {
|
|
284
284
|
receiptId?: string;
|
|
285
285
|
}, unknown>;
|
|
286
|
-
/** The Private
|
|
286
|
+
/** The Private Inference model catalog (`GET /v1/models`). */
|
|
287
287
|
models(opts?: {
|
|
288
288
|
apiKey?: string;
|
|
289
289
|
apiBase?: string;
|
package/dist/index.js
CHANGED
|
@@ -1896,7 +1896,7 @@ function resolveApiKey(apiKey) {
|
|
|
1896
1896
|
if (!key) {
|
|
1897
1897
|
throw new T2000Error(
|
|
1898
1898
|
"INVALID_KEY",
|
|
1899
|
-
"No Private
|
|
1899
|
+
"No Private Inference key. Pass `apiKey` or set T2000_API_KEY. Generate one at agents.t2000.ai/manage."
|
|
1900
1900
|
);
|
|
1901
1901
|
}
|
|
1902
1902
|
return key;
|
|
@@ -2607,9 +2607,9 @@ var T2000 = class _T2000 extends EventEmitter {
|
|
|
2607
2607
|
//
|
|
2608
2608
|
// Inference as a wallet verb — the agent's brain + wallet in one package.
|
|
2609
2609
|
// Key-based today (`apiKey` / `T2000_API_KEY`); the x402 no-key pay-per-call
|
|
2610
|
-
// path is a later add. The model runs on
|
|
2610
|
+
// path is a later add. The model runs on t2000 Private Inference (ZDR; a
|
|
2611
2611
|
// `phala/*` confidential tier runs in a GPU-TEE).
|
|
2612
|
-
/** Non-streaming chat completion against
|
|
2612
|
+
/** Non-streaming chat completion against Private Inference. */
|
|
2613
2613
|
async chat(params) {
|
|
2614
2614
|
return chatCompletion(params);
|
|
2615
2615
|
}
|
|
@@ -2618,7 +2618,7 @@ var T2000 = class _T2000 extends EventEmitter {
|
|
|
2618
2618
|
chatStream(params) {
|
|
2619
2619
|
return chatCompletionStream(params);
|
|
2620
2620
|
}
|
|
2621
|
-
/** The Private
|
|
2621
|
+
/** The Private Inference model catalog (`GET /v1/models`). */
|
|
2622
2622
|
async models(opts) {
|
|
2623
2623
|
return listModels(opts);
|
|
2624
2624
|
}
|