@amigo-ai/platform-sdk 0.29.0 → 0.31.0
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 +8 -5
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +8 -5
- package/dist/index.mjs.map +2 -2
- package/dist/resources/conversations.js +8 -5
- package/dist/resources/conversations.js.map +1 -1
- package/dist/types/generated/api.d.ts +80 -1
- package/dist/types/generated/api.d.ts.map +1 -1
- package/dist/types/resources/conversations.d.ts +7 -3
- package/dist/types/resources/conversations.d.ts.map +1 -1
- package/dist/types/resources/functions.d.ts.map +1 -1
- package/dist/types/resources/intake.d.ts.map +1 -1
- package/dist/types/resources/metrics.d.ts.map +1 -1
- package/dist/types/resources/operators.d.ts.map +1 -1
- package/dist/types/resources/settings.d.ts.map +1 -1
- package/dist/types/resources/surfaces.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2175,10 +2175,14 @@ var ConversationsResource = class extends WorkspaceScopedResource {
|
|
|
2175
2175
|
);
|
|
2176
2176
|
}
|
|
2177
2177
|
/**
|
|
2178
|
-
* Send a message and receive the agent's response as an SSE stream.
|
|
2178
|
+
* Send a message and receive the agent's response as an SSE byte stream.
|
|
2179
2179
|
*
|
|
2180
|
-
*
|
|
2181
|
-
*
|
|
2180
|
+
* Targets the explicit always-SSE endpoint
|
|
2181
|
+
* `POST /v1/{ws}/conversations/{id}/turns/stream`, so the response is
|
|
2182
|
+
* always `text/event-stream` regardless of `Accept` negotiation. Returns
|
|
2183
|
+
* a `ReadableStream` of raw bytes; use `EventSourceParserStream` (from
|
|
2184
|
+
* `eventsource-parser/stream`) to parse into typed `TurnStreamEvent`,
|
|
2185
|
+
* or use the higher-level {@link streamTurn} which hides the parser.
|
|
2182
2186
|
*
|
|
2183
2187
|
* @example
|
|
2184
2188
|
* ```ts
|
|
@@ -2194,7 +2198,7 @@ var ConversationsResource = class extends WorkspaceScopedResource {
|
|
|
2194
2198
|
*/
|
|
2195
2199
|
async createTurnStream(conversationId, request, options) {
|
|
2196
2200
|
const result = await this.client.POST(
|
|
2197
|
-
"/v1/{workspace_id}/conversations/{conversation_id}/turns",
|
|
2201
|
+
"/v1/{workspace_id}/conversations/{conversation_id}/turns/stream",
|
|
2198
2202
|
{
|
|
2199
2203
|
params: {
|
|
2200
2204
|
path: { workspace_id: this.workspaceId, conversation_id: conversationId },
|
|
@@ -2203,7 +2207,6 @@ var ConversationsResource = class extends WorkspaceScopedResource {
|
|
|
2203
2207
|
}
|
|
2204
2208
|
},
|
|
2205
2209
|
body: request,
|
|
2206
|
-
headers: { Accept: "text/event-stream" },
|
|
2207
2210
|
parseAs: "stream",
|
|
2208
2211
|
signal: options?.signal
|
|
2209
2212
|
}
|