@reminix/sdk 0.8.1 → 0.8.3
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/CHANGELOG.md +31 -0
- package/README.md +10 -43
- package/client.d.mts +5 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +5 -5
- package/client.d.ts.map +1 -1
- package/client.js +3 -3
- package/client.js.map +1 -1
- package/client.mjs +3 -3
- package/client.mjs.map +1 -1
- package/core/streaming.d.mts +33 -0
- package/core/streaming.d.mts.map +1 -0
- package/core/streaming.d.ts +33 -0
- package/core/streaming.d.ts.map +1 -0
- package/core/streaming.js +263 -0
- package/core/streaming.js.map +1 -0
- package/core/streaming.mjs +258 -0
- package/core/streaming.mjs.map +1 -0
- package/index.d.mts +0 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts +0 -1
- package/index.d.ts.map +1 -1
- package/index.js +1 -5
- package/index.js.map +1 -1
- package/index.mjs +0 -2
- package/index.mjs.map +1 -1
- package/internal/decoders/line.d.mts +17 -0
- package/internal/decoders/line.d.mts.map +1 -0
- package/internal/decoders/line.d.ts +17 -0
- package/internal/decoders/line.d.ts.map +1 -0
- package/internal/decoders/line.js +113 -0
- package/internal/decoders/line.js.map +1 -0
- package/internal/decoders/line.mjs +108 -0
- package/internal/decoders/line.mjs.map +1 -0
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +10 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +10 -0
- package/internal/parse.mjs.map +1 -1
- package/internal/request-options.d.mts +2 -0
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts +2 -0
- package/internal/request-options.d.ts.map +1 -1
- package/internal/request-options.js.map +1 -1
- package/internal/request-options.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agents.d.mts +80 -56
- package/resources/agents.d.mts.map +1 -1
- package/resources/agents.d.ts +80 -56
- package/resources/agents.d.ts.map +1 -1
- package/resources/agents.js +7 -127
- package/resources/agents.js.map +1 -1
- package/resources/agents.mjs +7 -126
- package/resources/agents.mjs.map +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/{project.d.mts → projects.d.mts} +31 -7
- package/resources/projects.d.mts.map +1 -0
- package/resources/{project.d.ts → projects.d.ts} +31 -7
- package/resources/projects.d.ts.map +1 -0
- package/resources/{project.js → projects.js} +8 -7
- package/resources/projects.js.map +1 -0
- package/resources/{project.mjs → projects.mjs} +6 -5
- package/resources/projects.mjs.map +1 -0
- package/src/client.ts +14 -4
- package/src/core/streaming.ts +315 -0
- package/src/index.ts +0 -4
- package/src/internal/decoders/line.ts +135 -0
- package/src/internal/parse.ts +14 -0
- package/src/internal/request-options.ts +2 -0
- package/src/resources/agents.ts +132 -84
- package/src/resources/index.ts +6 -1
- package/src/resources/{project.ts → projects.ts} +35 -7
- package/src/streaming.ts +2 -87
- package/src/version.ts +1 -1
- package/streaming.d.mts +1 -30
- package/streaming.d.mts.map +1 -1
- package/streaming.d.ts +1 -30
- package/streaming.d.ts.map +1 -1
- package/streaming.js +3 -80
- package/streaming.js.map +1 -1
- package/streaming.mjs +1 -78
- package/streaming.mjs.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/project.d.mts.map +0 -1
- package/resources/project.d.ts.map +0 -1
- package/resources/project.js.map +0 -1
- package/resources/project.mjs.map +0 -1
package/resources/agents.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import * as AgentsAPI from "./agents.js";
|
|
2
3
|
import { APIPromise } from "../core/api-promise.js";
|
|
4
|
+
import { Stream } from "../core/streaming.js";
|
|
3
5
|
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
-
import { Stream, StreamChunk } from "../streaming.js";
|
|
5
6
|
export declare class Agents extends APIResource {
|
|
6
7
|
/**
|
|
7
8
|
* Have a conversational interaction with an agent. This endpoint maintains
|
|
@@ -43,7 +44,9 @@ export declare class Agents extends APIResource {
|
|
|
43
44
|
* });
|
|
44
45
|
* ```
|
|
45
46
|
*/
|
|
46
|
-
chat(name: string, body:
|
|
47
|
+
chat(name: string, body: AgentChatParamsNonStreaming, options?: RequestOptions): APIPromise<AgentChatResponse>;
|
|
48
|
+
chat(name: string, body: AgentChatParamsStreaming, options?: RequestOptions): APIPromise<Stream<StreamChunk>>;
|
|
49
|
+
chat(name: string, body: AgentChatParamsBase, options?: RequestOptions): APIPromise<Stream<StreamChunk> | AgentChatResponse>;
|
|
47
50
|
/**
|
|
48
51
|
* Execute a one-shot task with an agent. This endpoint is designed for
|
|
49
52
|
* task-oriented operations where you provide input and receive a complete output.
|
|
@@ -78,41 +81,9 @@ export declare class Agents extends APIResource {
|
|
|
78
81
|
* });
|
|
79
82
|
* ```
|
|
80
83
|
*/
|
|
81
|
-
invoke(name: string, body:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
*
|
|
85
|
-
* Have a conversational interaction with an agent with real-time streaming.
|
|
86
|
-
* Each chunk contains a portion of the response as it's generated.
|
|
87
|
-
*
|
|
88
|
-
* @example
|
|
89
|
-
* ```ts
|
|
90
|
-
* const stream = await client.agents.chatStream('my-agent', {
|
|
91
|
-
* messages: [{ role: 'user', content: 'Tell me a story' }],
|
|
92
|
-
* });
|
|
93
|
-
* for await (const chunk of stream) {
|
|
94
|
-
* process.stdout.write(chunk.chunk);
|
|
95
|
-
* }
|
|
96
|
-
* ```
|
|
97
|
-
*/
|
|
98
|
-
chatStream(name: string, body: Omit<AgentChatParams, 'stream'>, options?: RequestOptions): Promise<Stream<StreamChunk>>;
|
|
99
|
-
/**
|
|
100
|
-
* Streaming variant of invoke(). Returns an async iterable of chunks.
|
|
101
|
-
*
|
|
102
|
-
* Execute a one-shot task with an agent with real-time streaming.
|
|
103
|
-
* Each chunk contains a portion of the response as it's generated.
|
|
104
|
-
*
|
|
105
|
-
* @example
|
|
106
|
-
* ```ts
|
|
107
|
-
* const stream = await client.agents.invokeStream('my-agent', {
|
|
108
|
-
* input: { task: 'generate', prompt: 'Write a poem' },
|
|
109
|
-
* });
|
|
110
|
-
* for await (const chunk of stream) {
|
|
111
|
-
* process.stdout.write(chunk.chunk);
|
|
112
|
-
* }
|
|
113
|
-
* ```
|
|
114
|
-
*/
|
|
115
|
-
invokeStream(name: string, body: Omit<AgentInvokeParams, 'stream'>, options?: RequestOptions): Promise<Stream<StreamChunk>>;
|
|
84
|
+
invoke(name: string, body: AgentInvokeParamsNonStreaming, options?: RequestOptions): APIPromise<AgentInvokeResponse>;
|
|
85
|
+
invoke(name: string, body: AgentInvokeParamsStreaming, options?: RequestOptions): APIPromise<Stream<StreamChunk>>;
|
|
86
|
+
invoke(name: string, body: AgentInvokeParamsBase, options?: RequestOptions): APIPromise<Stream<StreamChunk> | AgentInvokeResponse>;
|
|
116
87
|
}
|
|
117
88
|
/**
|
|
118
89
|
* Optional request context passed to the agent handler.
|
|
@@ -133,31 +104,52 @@ export interface Context {
|
|
|
133
104
|
*/
|
|
134
105
|
user_id?: string;
|
|
135
106
|
}
|
|
136
|
-
export interface
|
|
107
|
+
export interface StreamChunk {
|
|
137
108
|
/**
|
|
138
|
-
*
|
|
109
|
+
* Text chunk from the stream
|
|
139
110
|
*/
|
|
140
|
-
|
|
111
|
+
chunk: string;
|
|
141
112
|
}
|
|
142
|
-
export
|
|
113
|
+
export interface AgentChatResponse {
|
|
114
|
+
/**
|
|
115
|
+
* Full conversation history including the assistant response
|
|
116
|
+
*/
|
|
117
|
+
messages: Array<AgentChatResponse.Message>;
|
|
143
118
|
/**
|
|
144
|
-
*
|
|
119
|
+
* Final assistant response text
|
|
145
120
|
*/
|
|
121
|
+
output: string;
|
|
122
|
+
}
|
|
123
|
+
export declare namespace AgentChatResponse {
|
|
146
124
|
interface Message {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
125
|
+
/**
|
|
126
|
+
* Message content. Can be string, array (multimodal), or object (tool).
|
|
127
|
+
*/
|
|
128
|
+
content: string | Array<Message.UnionMember1> | {
|
|
129
|
+
[key: string]: unknown;
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Message role
|
|
133
|
+
*/
|
|
134
|
+
role: 'system' | 'user' | 'assistant' | 'tool';
|
|
135
|
+
/**
|
|
136
|
+
* Tool name (required when role is "tool")
|
|
137
|
+
*/
|
|
138
|
+
name?: string;
|
|
139
|
+
/**
|
|
140
|
+
* Tool call ID (for tool role)
|
|
141
|
+
*/
|
|
142
|
+
tool_call_id?: string;
|
|
150
143
|
}
|
|
151
144
|
namespace Message {
|
|
152
|
-
interface
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
145
|
+
interface UnionMember1 {
|
|
146
|
+
type: 'text' | 'image_url';
|
|
147
|
+
image_url?: UnionMember1.ImageURL;
|
|
148
|
+
text?: string;
|
|
156
149
|
}
|
|
157
|
-
namespace
|
|
158
|
-
interface
|
|
159
|
-
|
|
160
|
-
name: string;
|
|
150
|
+
namespace UnionMember1 {
|
|
151
|
+
interface ImageURL {
|
|
152
|
+
url: string;
|
|
161
153
|
}
|
|
162
154
|
}
|
|
163
155
|
}
|
|
@@ -168,7 +160,8 @@ export interface AgentInvokeResponse {
|
|
|
168
160
|
*/
|
|
169
161
|
output?: unknown;
|
|
170
162
|
}
|
|
171
|
-
export
|
|
163
|
+
export type AgentChatParams = AgentChatParamsNonStreaming | AgentChatParamsStreaming;
|
|
164
|
+
export interface AgentChatParamsBase {
|
|
172
165
|
/**
|
|
173
166
|
* Conversation history. Must include at least one message.
|
|
174
167
|
*/
|
|
@@ -215,8 +208,23 @@ export declare namespace AgentChatParams {
|
|
|
215
208
|
}
|
|
216
209
|
}
|
|
217
210
|
}
|
|
211
|
+
type AgentChatParamsNonStreaming = AgentsAPI.AgentChatParamsNonStreaming;
|
|
212
|
+
type AgentChatParamsStreaming = AgentsAPI.AgentChatParamsStreaming;
|
|
213
|
+
}
|
|
214
|
+
export interface AgentChatParamsNonStreaming extends AgentChatParamsBase {
|
|
215
|
+
/**
|
|
216
|
+
* Whether to stream the response as SSE.
|
|
217
|
+
*/
|
|
218
|
+
stream?: false;
|
|
219
|
+
}
|
|
220
|
+
export interface AgentChatParamsStreaming extends AgentChatParamsBase {
|
|
221
|
+
/**
|
|
222
|
+
* Whether to stream the response as SSE.
|
|
223
|
+
*/
|
|
224
|
+
stream: true;
|
|
218
225
|
}
|
|
219
|
-
export
|
|
226
|
+
export type AgentInvokeParams = AgentInvokeParamsNonStreaming | AgentInvokeParamsStreaming;
|
|
227
|
+
export interface AgentInvokeParamsBase {
|
|
220
228
|
/**
|
|
221
229
|
* Input data for the agent. Structure depends on agent implementation.
|
|
222
230
|
*/
|
|
@@ -232,7 +240,23 @@ export interface AgentInvokeParams {
|
|
|
232
240
|
*/
|
|
233
241
|
stream?: boolean;
|
|
234
242
|
}
|
|
243
|
+
export declare namespace AgentInvokeParams {
|
|
244
|
+
type AgentInvokeParamsNonStreaming = AgentsAPI.AgentInvokeParamsNonStreaming;
|
|
245
|
+
type AgentInvokeParamsStreaming = AgentsAPI.AgentInvokeParamsStreaming;
|
|
246
|
+
}
|
|
247
|
+
export interface AgentInvokeParamsNonStreaming extends AgentInvokeParamsBase {
|
|
248
|
+
/**
|
|
249
|
+
* Whether to stream the response as SSE.
|
|
250
|
+
*/
|
|
251
|
+
stream?: false;
|
|
252
|
+
}
|
|
253
|
+
export interface AgentInvokeParamsStreaming extends AgentInvokeParamsBase {
|
|
254
|
+
/**
|
|
255
|
+
* Whether to stream the response as SSE.
|
|
256
|
+
*/
|
|
257
|
+
stream: true;
|
|
258
|
+
}
|
|
235
259
|
export declare namespace Agents {
|
|
236
|
-
export { type Context as Context, type AgentChatResponse as AgentChatResponse, type AgentInvokeResponse as AgentInvokeResponse, type AgentChatParams as AgentChatParams, type AgentInvokeParams as AgentInvokeParams, };
|
|
260
|
+
export { type Context as Context, type StreamChunk as StreamChunk, type AgentChatResponse as AgentChatResponse, type AgentInvokeResponse as AgentInvokeResponse, type AgentChatParams as AgentChatParams, type AgentChatParamsNonStreaming as AgentChatParamsNonStreaming, type AgentChatParamsStreaming as AgentChatParamsStreaming, type AgentInvokeParams as AgentInvokeParams, type AgentInvokeParamsNonStreaming as AgentInvokeParamsNonStreaming, type AgentInvokeParamsStreaming as AgentInvokeParamsStreaming, };
|
|
237
261
|
}
|
|
238
262
|
//# sourceMappingURL=agents.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/resources/agents.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/resources/agents.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE;OACV,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,IAAI,CACF,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,2BAA2B,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iBAAiB,CAAC;IAChC,IAAI,CACF,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,wBAAwB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAClC,IAAI,CACF,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,mBAAmB,EACzB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,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I,mBAAmB,EAC/C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
|
package/resources/agents.js
CHANGED
|
@@ -4,140 +4,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.Agents = void 0;
|
|
5
5
|
const resource_1 = require("../core/resource.js");
|
|
6
6
|
const path_1 = require("../internal/utils/path.js");
|
|
7
|
-
// stainless-custom-start
|
|
8
|
-
const streaming_1 = require("../streaming.js");
|
|
9
|
-
// stainless-custom-end
|
|
10
7
|
class Agents extends resource_1.APIResource {
|
|
11
|
-
/**
|
|
12
|
-
* Have a conversational interaction with an agent. This endpoint maintains
|
|
13
|
-
* conversation context through the messages array, allowing for multi-turn
|
|
14
|
-
* conversations.
|
|
15
|
-
*
|
|
16
|
-
* **Timeout:** Chat requests have a 60-second timeout. If the agent takes longer
|
|
17
|
-
* to respond, you will receive a 504 Gateway Timeout error. For long-running
|
|
18
|
-
* conversations, consider using streaming mode which does not have the same
|
|
19
|
-
* timeout constraints.
|
|
20
|
-
*
|
|
21
|
-
* **Idempotency:** For non-streaming requests, send an `Idempotency-Key` header
|
|
22
|
-
* with a unique value (e.g., UUID) to ensure duplicate requests return the same
|
|
23
|
-
* response. Keys are valid for 24 hours. Streaming responses are not cached.
|
|
24
|
-
*
|
|
25
|
-
* **Use cases:**
|
|
26
|
-
*
|
|
27
|
-
* - Customer support chatbots
|
|
28
|
-
* - AI assistants with memory
|
|
29
|
-
* - Multi-step question answering
|
|
30
|
-
* - Conversational agents that need context
|
|
31
|
-
*
|
|
32
|
-
* **Message format:** Follows OpenAI-compliant message structure with support for:
|
|
33
|
-
*
|
|
34
|
-
* - `system`, `user`, `assistant`, and `tool` roles
|
|
35
|
-
* - Multimodal content (text + images)
|
|
36
|
-
* - Tool/function calling
|
|
37
|
-
*
|
|
38
|
-
* **Streaming:** Set `stream: true` in the request body to receive Server-Sent
|
|
39
|
-
* Events (SSE) stream with incremental chunks. Perfect for ChatGPT-like real-time
|
|
40
|
-
* chat interfaces.
|
|
41
|
-
*
|
|
42
|
-
* @example
|
|
43
|
-
* ```ts
|
|
44
|
-
* const response = await client.agents.chat('name', {
|
|
45
|
-
* messages: [
|
|
46
|
-
* { role: 'user', content: 'What is the weather today?' },
|
|
47
|
-
* ],
|
|
48
|
-
* });
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
8
|
chat(name, body, options) {
|
|
52
|
-
return this._client.post((0, path_1.path) `/agents/${name}/chat`, {
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Execute a one-shot task with an agent. This endpoint is designed for
|
|
56
|
-
* task-oriented operations where you provide input and receive a complete output.
|
|
57
|
-
*
|
|
58
|
-
* **Timeout:** Agent invocations have a 60-second timeout. If the agent takes
|
|
59
|
-
* longer to respond, you will receive a 504 Gateway Timeout error. For
|
|
60
|
-
* long-running tasks, consider using streaming mode which does not have the same
|
|
61
|
-
* timeout constraints.
|
|
62
|
-
*
|
|
63
|
-
* **Idempotency:** For non-streaming requests, send an `Idempotency-Key` header
|
|
64
|
-
* with a unique value (e.g., UUID) to ensure duplicate requests return the same
|
|
65
|
-
* response. Keys are valid for 24 hours. Streaming responses are not cached.
|
|
66
|
-
*
|
|
67
|
-
* **Use cases:**
|
|
68
|
-
*
|
|
69
|
-
* - Data analysis and processing
|
|
70
|
-
* - Content generation (with streaming for long outputs)
|
|
71
|
-
* - One-time operations that don't require conversation history
|
|
72
|
-
* - API-like operations
|
|
73
|
-
*
|
|
74
|
-
* **Streaming:** Set `stream: true` in the request body to receive Server-Sent
|
|
75
|
-
* Events (SSE) stream with incremental chunks. Useful for long-running tasks or
|
|
76
|
-
* real-time progress updates.
|
|
77
|
-
*
|
|
78
|
-
* @example
|
|
79
|
-
* ```ts
|
|
80
|
-
* const response = await client.agents.invoke('name', {
|
|
81
|
-
* input: {
|
|
82
|
-
* task: 'analyze this data',
|
|
83
|
-
* data: { value: 123, items: ['a', 'b', 'c'] },
|
|
84
|
-
* },
|
|
85
|
-
* });
|
|
86
|
-
* ```
|
|
87
|
-
*/
|
|
88
|
-
invoke(name, body, options) {
|
|
89
|
-
return this._client.post((0, path_1.path) `/agents/${name}/invoke`, { body, ...options });
|
|
90
|
-
}
|
|
91
|
-
// stainless-custom-start
|
|
92
|
-
/**
|
|
93
|
-
* Streaming variant of chat(). Returns an async iterable of chunks.
|
|
94
|
-
*
|
|
95
|
-
* Have a conversational interaction with an agent with real-time streaming.
|
|
96
|
-
* Each chunk contains a portion of the response as it's generated.
|
|
97
|
-
*
|
|
98
|
-
* @example
|
|
99
|
-
* ```ts
|
|
100
|
-
* const stream = await client.agents.chatStream('my-agent', {
|
|
101
|
-
* messages: [{ role: 'user', content: 'Tell me a story' }],
|
|
102
|
-
* });
|
|
103
|
-
* for await (const chunk of stream) {
|
|
104
|
-
* process.stdout.write(chunk.chunk);
|
|
105
|
-
* }
|
|
106
|
-
* ```
|
|
107
|
-
*/
|
|
108
|
-
async chatStream(name, body, options) {
|
|
109
|
-
const response = await this._client.post((0, path_1.path) `/agents/${name}/chat`, {
|
|
110
|
-
body: { ...body, stream: true },
|
|
9
|
+
return this._client.post((0, path_1.path) `/agents/${name}/chat`, {
|
|
10
|
+
body,
|
|
111
11
|
...options,
|
|
112
|
-
|
|
113
|
-
__binaryResponse: true,
|
|
12
|
+
stream: body.stream ?? false,
|
|
114
13
|
});
|
|
115
|
-
return new streaming_1.Stream(response);
|
|
116
14
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
* Execute a one-shot task with an agent with real-time streaming.
|
|
121
|
-
* Each chunk contains a portion of the response as it's generated.
|
|
122
|
-
*
|
|
123
|
-
* @example
|
|
124
|
-
* ```ts
|
|
125
|
-
* const stream = await client.agents.invokeStream('my-agent', {
|
|
126
|
-
* input: { task: 'generate', prompt: 'Write a poem' },
|
|
127
|
-
* });
|
|
128
|
-
* for await (const chunk of stream) {
|
|
129
|
-
* process.stdout.write(chunk.chunk);
|
|
130
|
-
* }
|
|
131
|
-
* ```
|
|
132
|
-
*/
|
|
133
|
-
async invokeStream(name, body, options) {
|
|
134
|
-
const response = await this._client.post((0, path_1.path) `/agents/${name}/invoke`, {
|
|
135
|
-
body: { ...body, stream: true },
|
|
15
|
+
invoke(name, body, options) {
|
|
16
|
+
return this._client.post((0, path_1.path) `/agents/${name}/invoke`, {
|
|
17
|
+
body,
|
|
136
18
|
...options,
|
|
137
|
-
|
|
138
|
-
__binaryResponse: true,
|
|
19
|
+
stream: body.stream ?? false,
|
|
139
20
|
});
|
|
140
|
-
return new streaming_1.Stream(response);
|
|
141
21
|
}
|
|
142
22
|
}
|
|
143
23
|
exports.Agents = Agents;
|
package/resources/agents.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../src/resources/agents.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;
|
|
1
|
+
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../src/resources/agents.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAK/C,oDAA8C;AAE9C,MAAa,MAAO,SAAQ,sBAAW;IAwDrC,IAAI,CACF,IAAY,EACZ,IAAqB,EACrB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,WAAW,IAAI,OAAO,EAAE;YACnD,IAAI;YACJ,GAAG,OAAO;YACV,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK;SAC7B,CAAoE,CAAC;IACxE,CAAC;IAmDD,MAAM,CACJ,IAAY,EACZ,IAAuB,EACvB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,WAAW,IAAI,SAAS,EAAE;YACrD,IAAI;YACJ,GAAG,OAAO;YACV,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK;SAC7B,CAAsE,CAAC;IAC1E,CAAC;CACF;AAhID,wBAgIC"}
|
package/resources/agents.mjs
CHANGED
|
@@ -1,139 +1,20 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../core/resource.mjs";
|
|
3
3
|
import { path } from "../internal/utils/path.mjs";
|
|
4
|
-
import { Stream } from "../streaming.mjs";
|
|
5
|
-
// stainless-custom-end
|
|
6
4
|
export class Agents extends APIResource {
|
|
7
|
-
/**
|
|
8
|
-
* Have a conversational interaction with an agent. This endpoint maintains
|
|
9
|
-
* conversation context through the messages array, allowing for multi-turn
|
|
10
|
-
* conversations.
|
|
11
|
-
*
|
|
12
|
-
* **Timeout:** Chat requests have a 60-second timeout. If the agent takes longer
|
|
13
|
-
* to respond, you will receive a 504 Gateway Timeout error. For long-running
|
|
14
|
-
* conversations, consider using streaming mode which does not have the same
|
|
15
|
-
* timeout constraints.
|
|
16
|
-
*
|
|
17
|
-
* **Idempotency:** For non-streaming requests, send an `Idempotency-Key` header
|
|
18
|
-
* with a unique value (e.g., UUID) to ensure duplicate requests return the same
|
|
19
|
-
* response. Keys are valid for 24 hours. Streaming responses are not cached.
|
|
20
|
-
*
|
|
21
|
-
* **Use cases:**
|
|
22
|
-
*
|
|
23
|
-
* - Customer support chatbots
|
|
24
|
-
* - AI assistants with memory
|
|
25
|
-
* - Multi-step question answering
|
|
26
|
-
* - Conversational agents that need context
|
|
27
|
-
*
|
|
28
|
-
* **Message format:** Follows OpenAI-compliant message structure with support for:
|
|
29
|
-
*
|
|
30
|
-
* - `system`, `user`, `assistant`, and `tool` roles
|
|
31
|
-
* - Multimodal content (text + images)
|
|
32
|
-
* - Tool/function calling
|
|
33
|
-
*
|
|
34
|
-
* **Streaming:** Set `stream: true` in the request body to receive Server-Sent
|
|
35
|
-
* Events (SSE) stream with incremental chunks. Perfect for ChatGPT-like real-time
|
|
36
|
-
* chat interfaces.
|
|
37
|
-
*
|
|
38
|
-
* @example
|
|
39
|
-
* ```ts
|
|
40
|
-
* const response = await client.agents.chat('name', {
|
|
41
|
-
* messages: [
|
|
42
|
-
* { role: 'user', content: 'What is the weather today?' },
|
|
43
|
-
* ],
|
|
44
|
-
* });
|
|
45
|
-
* ```
|
|
46
|
-
*/
|
|
47
5
|
chat(name, body, options) {
|
|
48
|
-
return this._client.post(path `/agents/${name}/chat`, {
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Execute a one-shot task with an agent. This endpoint is designed for
|
|
52
|
-
* task-oriented operations where you provide input and receive a complete output.
|
|
53
|
-
*
|
|
54
|
-
* **Timeout:** Agent invocations have a 60-second timeout. If the agent takes
|
|
55
|
-
* longer to respond, you will receive a 504 Gateway Timeout error. For
|
|
56
|
-
* long-running tasks, consider using streaming mode which does not have the same
|
|
57
|
-
* timeout constraints.
|
|
58
|
-
*
|
|
59
|
-
* **Idempotency:** For non-streaming requests, send an `Idempotency-Key` header
|
|
60
|
-
* with a unique value (e.g., UUID) to ensure duplicate requests return the same
|
|
61
|
-
* response. Keys are valid for 24 hours. Streaming responses are not cached.
|
|
62
|
-
*
|
|
63
|
-
* **Use cases:**
|
|
64
|
-
*
|
|
65
|
-
* - Data analysis and processing
|
|
66
|
-
* - Content generation (with streaming for long outputs)
|
|
67
|
-
* - One-time operations that don't require conversation history
|
|
68
|
-
* - API-like operations
|
|
69
|
-
*
|
|
70
|
-
* **Streaming:** Set `stream: true` in the request body to receive Server-Sent
|
|
71
|
-
* Events (SSE) stream with incremental chunks. Useful for long-running tasks or
|
|
72
|
-
* real-time progress updates.
|
|
73
|
-
*
|
|
74
|
-
* @example
|
|
75
|
-
* ```ts
|
|
76
|
-
* const response = await client.agents.invoke('name', {
|
|
77
|
-
* input: {
|
|
78
|
-
* task: 'analyze this data',
|
|
79
|
-
* data: { value: 123, items: ['a', 'b', 'c'] },
|
|
80
|
-
* },
|
|
81
|
-
* });
|
|
82
|
-
* ```
|
|
83
|
-
*/
|
|
84
|
-
invoke(name, body, options) {
|
|
85
|
-
return this._client.post(path `/agents/${name}/invoke`, { body, ...options });
|
|
86
|
-
}
|
|
87
|
-
// stainless-custom-start
|
|
88
|
-
/**
|
|
89
|
-
* Streaming variant of chat(). Returns an async iterable of chunks.
|
|
90
|
-
*
|
|
91
|
-
* Have a conversational interaction with an agent with real-time streaming.
|
|
92
|
-
* Each chunk contains a portion of the response as it's generated.
|
|
93
|
-
*
|
|
94
|
-
* @example
|
|
95
|
-
* ```ts
|
|
96
|
-
* const stream = await client.agents.chatStream('my-agent', {
|
|
97
|
-
* messages: [{ role: 'user', content: 'Tell me a story' }],
|
|
98
|
-
* });
|
|
99
|
-
* for await (const chunk of stream) {
|
|
100
|
-
* process.stdout.write(chunk.chunk);
|
|
101
|
-
* }
|
|
102
|
-
* ```
|
|
103
|
-
*/
|
|
104
|
-
async chatStream(name, body, options) {
|
|
105
|
-
const response = await this._client.post(path `/agents/${name}/chat`, {
|
|
106
|
-
body: { ...body, stream: true },
|
|
6
|
+
return this._client.post(path `/agents/${name}/chat`, {
|
|
7
|
+
body,
|
|
107
8
|
...options,
|
|
108
|
-
|
|
109
|
-
__binaryResponse: true,
|
|
9
|
+
stream: body.stream ?? false,
|
|
110
10
|
});
|
|
111
|
-
return new Stream(response);
|
|
112
11
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
* Execute a one-shot task with an agent with real-time streaming.
|
|
117
|
-
* Each chunk contains a portion of the response as it's generated.
|
|
118
|
-
*
|
|
119
|
-
* @example
|
|
120
|
-
* ```ts
|
|
121
|
-
* const stream = await client.agents.invokeStream('my-agent', {
|
|
122
|
-
* input: { task: 'generate', prompt: 'Write a poem' },
|
|
123
|
-
* });
|
|
124
|
-
* for await (const chunk of stream) {
|
|
125
|
-
* process.stdout.write(chunk.chunk);
|
|
126
|
-
* }
|
|
127
|
-
* ```
|
|
128
|
-
*/
|
|
129
|
-
async invokeStream(name, body, options) {
|
|
130
|
-
const response = await this._client.post(path `/agents/${name}/invoke`, {
|
|
131
|
-
body: { ...body, stream: true },
|
|
12
|
+
invoke(name, body, options) {
|
|
13
|
+
return this._client.post(path `/agents/${name}/invoke`, {
|
|
14
|
+
body,
|
|
132
15
|
...options,
|
|
133
|
-
|
|
134
|
-
__binaryResponse: true,
|
|
16
|
+
stream: body.stream ?? false,
|
|
135
17
|
});
|
|
136
|
-
return new Stream(response);
|
|
137
18
|
}
|
|
138
19
|
}
|
|
139
20
|
//# sourceMappingURL=agents.mjs.map
|
package/resources/agents.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.mjs","sourceRoot":"","sources":["../src/resources/agents.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"agents.mjs","sourceRoot":"","sources":["../src/resources/agents.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAKf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,MAAO,SAAQ,WAAW;IAwDrC,IAAI,CACF,IAAY,EACZ,IAAqB,EACrB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,WAAW,IAAI,OAAO,EAAE;YACnD,IAAI;YACJ,GAAG,OAAO;YACV,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK;SAC7B,CAAoE,CAAC;IACxE,CAAC;IAmDD,MAAM,CACJ,IAAY,EACZ,IAAuB,EACvB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,WAAW,IAAI,SAAS,EAAE;YACrD,IAAI;YACJ,GAAG,OAAO;YACV,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK;SAC7B,CAAsE,CAAC;IAC1E,CAAC;CACF"}
|
package/resources/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Agents, type Context, type AgentChatResponse, type AgentInvokeResponse, type AgentChatParams, type AgentInvokeParams, } from "./agents.mjs";
|
|
2
|
-
export {
|
|
1
|
+
export { Agents, type Context, type StreamChunk, type AgentChatResponse, type AgentInvokeResponse, type AgentChatParams, type AgentChatParamsNonStreaming, type AgentChatParamsStreaming, type AgentInvokeParams, type AgentInvokeParamsNonStreaming, type AgentInvokeParamsStreaming, } from "./agents.mjs";
|
|
2
|
+
export { Projects, type ProjectRetrieveCurrentResponse } from "./projects.mjs";
|
|
3
3
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,MAAM,EACN,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,iBAAiB,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,MAAM,EACN,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,6BAA6B,EAClC,KAAK,0BAA0B,GAChC;OACM,EAAE,QAAQ,EAAE,KAAK,8BAA8B,EAAE"}
|
package/resources/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Agents, type Context, type AgentChatResponse, type AgentInvokeResponse, type AgentChatParams, type AgentInvokeParams, } from "./agents.js";
|
|
2
|
-
export {
|
|
1
|
+
export { Agents, type Context, type StreamChunk, type AgentChatResponse, type AgentInvokeResponse, type AgentChatParams, type AgentChatParamsNonStreaming, type AgentChatParamsStreaming, type AgentInvokeParams, type AgentInvokeParamsNonStreaming, type AgentInvokeParamsStreaming, } from "./agents.js";
|
|
2
|
+
export { Projects, type ProjectRetrieveCurrentResponse } from "./projects.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/resources/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,MAAM,EACN,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,iBAAiB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"OAEO,EACL,MAAM,EACN,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,6BAA6B,EAClC,KAAK,0BAA0B,GAChC;OACM,EAAE,QAAQ,EAAE,KAAK,8BAA8B,EAAE"}
|
package/resources/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
4
|
+
exports.Projects = exports.Agents = void 0;
|
|
5
5
|
var agents_1 = require("./agents.js");
|
|
6
6
|
Object.defineProperty(exports, "Agents", { enumerable: true, get: function () { return agents_1.Agents; } });
|
|
7
|
-
var
|
|
8
|
-
Object.defineProperty(exports, "
|
|
7
|
+
var projects_1 = require("./projects.js");
|
|
8
|
+
Object.defineProperty(exports, "Projects", { enumerable: true, get: function () { return projects_1.Projects; } });
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
package/resources/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sCAYkB;AAXhB,gGAAA,MAAM,OAAA;AAYR,0CAA2E;AAAlE,oGAAA,QAAQ,OAAA"}
|
package/resources/index.mjs
CHANGED
package/resources/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,MAAM,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,MAAM,GAWP;OACM,EAAE,QAAQ,EAAuC"}
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
2
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
3
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
-
export declare class
|
|
4
|
+
export declare class Projects extends APIResource {
|
|
5
5
|
/**
|
|
6
|
-
* Returns the project associated with the API key
|
|
6
|
+
* Returns the project associated with the API key or X-Project header.
|
|
7
7
|
*
|
|
8
8
|
* The project contains metadata about your organization's configuration,
|
|
9
9
|
* including:
|
|
10
10
|
*
|
|
11
11
|
* - Project ID and organization ID
|
|
12
12
|
* - Project name and slug
|
|
13
|
+
* - Organization details
|
|
13
14
|
* - Creation and update timestamps
|
|
14
15
|
*
|
|
15
16
|
* This endpoint is useful for verifying your API key is valid and retrieving
|
|
16
17
|
* project details.
|
|
17
18
|
*/
|
|
18
|
-
|
|
19
|
+
retrieveCurrent(options?: RequestOptions): APIPromise<ProjectRetrieveCurrentResponse>;
|
|
19
20
|
}
|
|
20
|
-
export interface
|
|
21
|
+
export interface ProjectRetrieveCurrentResponse {
|
|
21
22
|
/**
|
|
22
23
|
* Unique identifier for the project
|
|
23
24
|
*/
|
|
@@ -30,6 +31,10 @@ export interface ProjectRetrieveResponse {
|
|
|
30
31
|
* Human-readable name of the project
|
|
31
32
|
*/
|
|
32
33
|
name: string;
|
|
34
|
+
/**
|
|
35
|
+
* Organization that owns this project
|
|
36
|
+
*/
|
|
37
|
+
organization: ProjectRetrieveCurrentResponse.Organization;
|
|
33
38
|
/**
|
|
34
39
|
* ID of the organization that owns this project
|
|
35
40
|
*/
|
|
@@ -43,7 +48,26 @@ export interface ProjectRetrieveResponse {
|
|
|
43
48
|
*/
|
|
44
49
|
updatedAt: string;
|
|
45
50
|
}
|
|
46
|
-
export declare namespace
|
|
47
|
-
|
|
51
|
+
export declare namespace ProjectRetrieveCurrentResponse {
|
|
52
|
+
/**
|
|
53
|
+
* Organization that owns this project
|
|
54
|
+
*/
|
|
55
|
+
interface Organization {
|
|
56
|
+
/**
|
|
57
|
+
* Unique identifier for the organization
|
|
58
|
+
*/
|
|
59
|
+
id: string;
|
|
60
|
+
/**
|
|
61
|
+
* Human-readable name of the organization
|
|
62
|
+
*/
|
|
63
|
+
name: string;
|
|
64
|
+
/**
|
|
65
|
+
* URL-friendly identifier for the organization
|
|
66
|
+
*/
|
|
67
|
+
slug: string;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
export declare namespace Projects {
|
|
71
|
+
export { type ProjectRetrieveCurrentResponse as ProjectRetrieveCurrentResponse };
|
|
48
72
|
}
|
|
49
|
-
//# sourceMappingURL=
|
|
73
|
+
//# sourceMappingURL=projects.d.mts.map
|