@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.mjs
CHANGED
|
@@ -2067,10 +2067,14 @@ var ConversationsResource = class extends WorkspaceScopedResource {
|
|
|
2067
2067
|
);
|
|
2068
2068
|
}
|
|
2069
2069
|
/**
|
|
2070
|
-
* Send a message and receive the agent's response as an SSE stream.
|
|
2070
|
+
* Send a message and receive the agent's response as an SSE byte stream.
|
|
2071
2071
|
*
|
|
2072
|
-
*
|
|
2073
|
-
*
|
|
2072
|
+
* Targets the explicit always-SSE endpoint
|
|
2073
|
+
* `POST /v1/{ws}/conversations/{id}/turns/stream`, so the response is
|
|
2074
|
+
* always `text/event-stream` regardless of `Accept` negotiation. Returns
|
|
2075
|
+
* a `ReadableStream` of raw bytes; use `EventSourceParserStream` (from
|
|
2076
|
+
* `eventsource-parser/stream`) to parse into typed `TurnStreamEvent`,
|
|
2077
|
+
* or use the higher-level {@link streamTurn} which hides the parser.
|
|
2074
2078
|
*
|
|
2075
2079
|
* @example
|
|
2076
2080
|
* ```ts
|
|
@@ -2086,7 +2090,7 @@ var ConversationsResource = class extends WorkspaceScopedResource {
|
|
|
2086
2090
|
*/
|
|
2087
2091
|
async createTurnStream(conversationId, request, options) {
|
|
2088
2092
|
const result = await this.client.POST(
|
|
2089
|
-
"/v1/{workspace_id}/conversations/{conversation_id}/turns",
|
|
2093
|
+
"/v1/{workspace_id}/conversations/{conversation_id}/turns/stream",
|
|
2090
2094
|
{
|
|
2091
2095
|
params: {
|
|
2092
2096
|
path: { workspace_id: this.workspaceId, conversation_id: conversationId },
|
|
@@ -2095,7 +2099,6 @@ var ConversationsResource = class extends WorkspaceScopedResource {
|
|
|
2095
2099
|
}
|
|
2096
2100
|
},
|
|
2097
2101
|
body: request,
|
|
2098
|
-
headers: { Accept: "text/event-stream" },
|
|
2099
2102
|
parseAs: "stream",
|
|
2100
2103
|
signal: options?.signal
|
|
2101
2104
|
}
|