@amigo-ai/platform-sdk 0.21.0 → 0.22.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 +13 -2
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +13 -2
- package/dist/index.mjs.map +2 -2
- package/dist/resources/conversations.js +12 -1
- package/dist/resources/conversations.js.map +1 -1
- package/dist/types/resources/conversations.d.ts +11 -1
- package/dist/types/resources/conversations.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1885,11 +1885,22 @@ var ConversationsResource = class extends WorkspaceScopedResource {
|
|
|
1885
1885
|
}
|
|
1886
1886
|
});
|
|
1887
1887
|
}
|
|
1888
|
-
|
|
1888
|
+
/**
|
|
1889
|
+
* Send a user message and receive the agent's synchronous JSON response.
|
|
1890
|
+
*
|
|
1891
|
+
* Pass `options.includeToolCalls: true` to request tool-call metadata
|
|
1892
|
+
* alongside the response turns. Server-side default is `false` — without
|
|
1893
|
+
* this opt-in the `tool_calls` array on the `TurnResponse` will be empty
|
|
1894
|
+
* even when the agent invoked tools during the turn.
|
|
1895
|
+
*/
|
|
1896
|
+
async createTurn(conversationId, request, options) {
|
|
1889
1897
|
return extractData(
|
|
1890
1898
|
await this.client.POST("/v1/{workspace_id}/conversations/{conversation_id}/turns", {
|
|
1891
1899
|
params: {
|
|
1892
|
-
path: { workspace_id: this.workspaceId, conversation_id: conversationId }
|
|
1900
|
+
path: { workspace_id: this.workspaceId, conversation_id: conversationId },
|
|
1901
|
+
...options?.includeToolCalls !== void 0 && {
|
|
1902
|
+
query: { include_tool_calls: options.includeToolCalls }
|
|
1903
|
+
}
|
|
1893
1904
|
},
|
|
1894
1905
|
body: request,
|
|
1895
1906
|
headers: { Accept: "application/json" }
|