@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.cjs
CHANGED
|
@@ -1979,11 +1979,22 @@ var ConversationsResource = class extends WorkspaceScopedResource {
|
|
|
1979
1979
|
}
|
|
1980
1980
|
});
|
|
1981
1981
|
}
|
|
1982
|
-
|
|
1982
|
+
/**
|
|
1983
|
+
* Send a user message and receive the agent's synchronous JSON response.
|
|
1984
|
+
*
|
|
1985
|
+
* Pass `options.includeToolCalls: true` to request tool-call metadata
|
|
1986
|
+
* alongside the response turns. Server-side default is `false` — without
|
|
1987
|
+
* this opt-in the `tool_calls` array on the `TurnResponse` will be empty
|
|
1988
|
+
* even when the agent invoked tools during the turn.
|
|
1989
|
+
*/
|
|
1990
|
+
async createTurn(conversationId, request, options) {
|
|
1983
1991
|
return extractData(
|
|
1984
1992
|
await this.client.POST("/v1/{workspace_id}/conversations/{conversation_id}/turns", {
|
|
1985
1993
|
params: {
|
|
1986
|
-
path: { workspace_id: this.workspaceId, conversation_id: conversationId }
|
|
1994
|
+
path: { workspace_id: this.workspaceId, conversation_id: conversationId },
|
|
1995
|
+
...options?.includeToolCalls !== void 0 && {
|
|
1996
|
+
query: { include_tool_calls: options.includeToolCalls }
|
|
1997
|
+
}
|
|
1987
1998
|
},
|
|
1988
1999
|
body: request,
|
|
1989
2000
|
headers: { Accept: "application/json" }
|