sarvam-agents-client 0.3.0 → 0.3.1
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/README.md +16 -1
- package/dist/apis/FunctionToolsApi.d.ts +33 -0
- package/dist/apis/FunctionToolsApi.js +65 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/compose/agent.d.ts +16 -3
- package/dist/compose/agent.js +76 -7
- package/dist/compose/errors.d.ts +5 -1
- package/dist/compose/errors.js +4 -1
- package/dist/compose/events.d.ts +4 -0
- package/dist/compose/events.js +34 -0
- package/dist/compose/functionTool.d.ts +101 -0
- package/dist/compose/functionTool.js +420 -0
- package/dist/compose/index.d.ts +5 -2
- package/dist/compose/index.js +3 -1
- package/dist/compose/output.d.ts +11 -0
- package/dist/compose/output.js +32 -7
- package/dist/compose/run.d.ts +5 -1
- package/dist/compose/run.js +118 -25
- package/dist/compose/runState.d.ts +26 -1
- package/dist/compose/runState.js +30 -0
- package/dist/compose/settingsTransport.d.ts +20 -1
- package/dist/compose/settingsTransport.js +295 -3
- package/dist/compose/transport.d.ts +18 -1
- package/dist/esm/apis/FunctionToolsApi.d.ts +33 -0
- package/dist/esm/apis/FunctionToolsApi.js +61 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/compose/agent.d.ts +16 -3
- package/dist/esm/compose/agent.js +76 -7
- package/dist/esm/compose/errors.d.ts +5 -1
- package/dist/esm/compose/errors.js +4 -1
- package/dist/esm/compose/events.d.ts +4 -0
- package/dist/esm/compose/events.js +33 -0
- package/dist/esm/compose/functionTool.d.ts +101 -0
- package/dist/esm/compose/functionTool.js +406 -0
- package/dist/esm/compose/index.d.ts +5 -2
- package/dist/esm/compose/index.js +1 -0
- package/dist/esm/compose/output.d.ts +11 -0
- package/dist/esm/compose/output.js +30 -9
- package/dist/esm/compose/run.d.ts +5 -1
- package/dist/esm/compose/run.js +118 -25
- package/dist/esm/compose/runState.d.ts +26 -1
- package/dist/esm/compose/runState.js +31 -1
- package/dist/esm/compose/settingsTransport.d.ts +20 -1
- package/dist/esm/compose/settingsTransport.js +298 -7
- package/dist/esm/compose/transport.d.ts +18 -1
- package/dist/esm/models/AgentConversationDetail.d.ts +7 -0
- package/dist/esm/models/AgentConversationDetail.js +3 -0
- package/dist/esm/models/ClarifyBody.d.ts +6 -0
- package/dist/esm/models/ClarifyBody.js +2 -0
- package/dist/esm/models/ConversationDetail.d.ts +7 -0
- package/dist/esm/models/ConversationDetail.js +3 -0
- package/dist/esm/models/ErrorDetail.d.ts +1 -0
- package/dist/esm/models/ErrorDetail.js +2 -1
- package/dist/esm/models/FunctionResultBody.d.ts +44 -0
- package/dist/esm/models/FunctionResultBody.js +49 -0
- package/dist/esm/models/QueueMessageInput.d.ts +23 -0
- package/dist/esm/models/QueueMessageInput.js +14 -0
- package/dist/esm/models/RequiredAction.d.ts +77 -0
- package/dist/esm/models/RequiredAction.js +69 -0
- package/dist/esm/models/ResponseDetail.d.ts +8 -0
- package/dist/esm/models/ResponseDetail.js +2 -0
- package/dist/esm/models/ResponseInput.d.ts +23 -0
- package/dist/esm/models/ResponseInput.js +14 -0
- package/dist/esm/models/ToolResults200Response.d.ts +38 -0
- package/dist/esm/models/ToolResults200Response.js +47 -0
- package/dist/esm/models/ToolResultsBody.d.ts +39 -0
- package/dist/esm/models/ToolResultsBody.js +48 -0
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/esm/streaming.d.ts +14 -2
- package/dist/esm/streaming.js +26 -4
- package/dist/models/AgentConversationDetail.d.ts +7 -0
- package/dist/models/AgentConversationDetail.js +3 -0
- package/dist/models/ClarifyBody.d.ts +6 -0
- package/dist/models/ClarifyBody.js +2 -0
- package/dist/models/ConversationDetail.d.ts +7 -0
- package/dist/models/ConversationDetail.js +3 -0
- package/dist/models/ErrorDetail.d.ts +1 -0
- package/dist/models/ErrorDetail.js +2 -1
- package/dist/models/FunctionResultBody.d.ts +44 -0
- package/dist/models/FunctionResultBody.js +56 -0
- package/dist/models/QueueMessageInput.d.ts +23 -0
- package/dist/models/QueueMessageInput.js +15 -1
- package/dist/models/RequiredAction.d.ts +77 -0
- package/dist/models/RequiredAction.js +77 -0
- package/dist/models/ResponseDetail.d.ts +8 -0
- package/dist/models/ResponseDetail.js +2 -0
- package/dist/models/ResponseInput.d.ts +23 -0
- package/dist/models/ResponseInput.js +15 -0
- package/dist/models/ToolResults200Response.d.ts +38 -0
- package/dist/models/ToolResults200Response.js +54 -0
- package/dist/models/ToolResultsBody.d.ts +39 -0
- package/dist/models/ToolResultsBody.js +55 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/dist/streaming.d.ts +14 -2
- package/dist/streaming.js +27 -4
- package/package.json +1 -1
- package/src/apis/FunctionToolsApi.ts +102 -0
- package/src/apis/index.ts +1 -0
- package/src/compose/agent.ts +87 -9
- package/src/compose/errors.ts +7 -1
- package/src/compose/events.ts +30 -0
- package/src/compose/functionTool.ts +441 -0
- package/src/compose/index.ts +5 -2
- package/src/compose/output.ts +30 -9
- package/src/compose/run.ts +115 -18
- package/src/compose/runState.ts +44 -5
- package/src/compose/settingsTransport.ts +293 -7
- package/src/compose/transport.ts +24 -1
- package/src/models/AgentConversationDetail.ts +15 -0
- package/src/models/ClarifyBody.ts +8 -0
- package/src/models/ConversationDetail.ts +15 -0
- package/src/models/ErrorDetail.ts +2 -1
- package/src/models/FunctionResultBody.ts +83 -0
- package/src/models/QueueMessageInput.ts +28 -0
- package/src/models/RequiredAction.ts +128 -0
- package/src/models/ResponseDetail.ts +8 -0
- package/src/models/ResponseInput.ts +30 -0
- package/src/models/ToolResults200Response.ts +75 -0
- package/src/models/ToolResultsBody.ts +83 -0
- package/src/models/index.ts +4 -0
- package/src/streaming.ts +39 -3
|
@@ -37,6 +37,7 @@ function ClarifyBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
37
37
|
'requestId': json['requestId'],
|
|
38
38
|
'action': json['action'] == null ? undefined : json['action'],
|
|
39
39
|
'answers': json['answers'] == null ? undefined : json['answers'],
|
|
40
|
+
'endUserId': json['endUserId'] == null ? undefined : json['endUserId'],
|
|
40
41
|
};
|
|
41
42
|
}
|
|
42
43
|
function ClarifyBodyToJSON(json) {
|
|
@@ -50,5 +51,6 @@ function ClarifyBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
50
51
|
'requestId': value['requestId'],
|
|
51
52
|
'action': value['action'],
|
|
52
53
|
'answers': value['answers'],
|
|
54
|
+
'endUserId': value['endUserId'],
|
|
53
55
|
};
|
|
54
56
|
}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import type { UIMessage } from './UIMessage.js';
|
|
13
13
|
import type { FieldHighlight } from './FieldHighlight.js';
|
|
14
|
+
import type { RequiredAction } from './RequiredAction.js';
|
|
14
15
|
import type { QueuedTurnView } from './QueuedTurnView.js';
|
|
15
16
|
/**
|
|
16
17
|
* GET /conversations/{id} — the list view plus the projected history and
|
|
@@ -135,6 +136,12 @@ export interface ConversationDetail {
|
|
|
135
136
|
* @memberof ConversationDetail
|
|
136
137
|
*/
|
|
137
138
|
queuedTurns?: Array<QueuedTurnView>;
|
|
139
|
+
/**
|
|
140
|
+
*
|
|
141
|
+
* @type {Array<RequiredAction>}
|
|
142
|
+
* @memberof ConversationDetail
|
|
143
|
+
*/
|
|
144
|
+
requiredActions?: Array<RequiredAction>;
|
|
138
145
|
}
|
|
139
146
|
/**
|
|
140
147
|
* Check if a given object implements the ConversationDetail interface.
|
|
@@ -20,6 +20,7 @@ exports.ConversationDetailToJSON = ConversationDetailToJSON;
|
|
|
20
20
|
exports.ConversationDetailToJSONTyped = ConversationDetailToJSONTyped;
|
|
21
21
|
const UIMessage_js_1 = require("./UIMessage.js");
|
|
22
22
|
const FieldHighlight_js_1 = require("./FieldHighlight.js");
|
|
23
|
+
const RequiredAction_js_1 = require("./RequiredAction.js");
|
|
23
24
|
const QueuedTurnView_js_1 = require("./QueuedTurnView.js");
|
|
24
25
|
/**
|
|
25
26
|
* Check if a given object implements the ConversationDetail interface.
|
|
@@ -84,6 +85,7 @@ function ConversationDetailFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
84
85
|
'hasMore': json['hasMore'] == null ? undefined : json['hasMore'],
|
|
85
86
|
'nextBeforeCursor': json['nextBeforeCursor'] == null ? undefined : json['nextBeforeCursor'],
|
|
86
87
|
'queuedTurns': json['queuedTurns'] == null ? undefined : (json['queuedTurns'].map(QueuedTurnView_js_1.QueuedTurnViewFromJSON)),
|
|
88
|
+
'requiredActions': json['requiredActions'] == null ? undefined : (json['requiredActions'].map(RequiredAction_js_1.RequiredActionFromJSON)),
|
|
87
89
|
};
|
|
88
90
|
}
|
|
89
91
|
function ConversationDetailToJSON(json) {
|
|
@@ -113,5 +115,6 @@ function ConversationDetailToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
113
115
|
'hasMore': value['hasMore'],
|
|
114
116
|
'nextBeforeCursor': value['nextBeforeCursor'],
|
|
115
117
|
'queuedTurns': value['queuedTurns'] == null ? undefined : (value['queuedTurns'].map(QueuedTurnView_js_1.QueuedTurnViewToJSON)),
|
|
118
|
+
'requiredActions': value['requiredActions'] == null ? undefined : (value['requiredActions'].map(RequiredAction_js_1.RequiredActionToJSON)),
|
|
116
119
|
};
|
|
117
120
|
}
|
|
@@ -58,6 +58,7 @@ export declare const ErrorDetailCodeEnum: {
|
|
|
58
58
|
readonly Unavailable: "CHAT_UNAVAILABLE";
|
|
59
59
|
readonly Upstream: "CHAT_UPSTREAM";
|
|
60
60
|
readonly Internal: "CHAT_INTERNAL";
|
|
61
|
+
readonly BalanceExhausted: "CHAT_BALANCE_EXHAUSTED";
|
|
61
62
|
};
|
|
62
63
|
export type ErrorDetailCodeEnum = typeof ErrorDetailCodeEnum[keyof typeof ErrorDetailCodeEnum];
|
|
63
64
|
/**
|
|
@@ -33,7 +33,8 @@ exports.ErrorDetailCodeEnum = {
|
|
|
33
33
|
RateLimit: 'CHAT_RATE_LIMIT',
|
|
34
34
|
Unavailable: 'CHAT_UNAVAILABLE',
|
|
35
35
|
Upstream: 'CHAT_UPSTREAM',
|
|
36
|
-
Internal: 'CHAT_INTERNAL'
|
|
36
|
+
Internal: 'CHAT_INTERNAL',
|
|
37
|
+
BalanceExhausted: 'CHAT_BALANCE_EXHAUSTED'
|
|
37
38
|
};
|
|
38
39
|
/**
|
|
39
40
|
* Check if a given object implements the ErrorDetail interface.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sarvam Agents API
|
|
3
|
+
* Chat with a Sarvam agent, exchange files with it, and set it up (instructions, skills, knowledge bases, connectors, deploy) from your own code. Authenticate with a service token sent as a Bearer token, and send the header X-Panja-Origin: managed_agents on every request.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
* Contact: support@sarvam.ai
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* One call's result, as the app ran it.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface FunctionResultBody
|
|
16
|
+
*/
|
|
17
|
+
export interface FunctionResultBody {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof FunctionResultBody
|
|
22
|
+
*/
|
|
23
|
+
toolCallId: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof FunctionResultBody
|
|
28
|
+
*/
|
|
29
|
+
output: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {boolean}
|
|
33
|
+
* @memberof FunctionResultBody
|
|
34
|
+
*/
|
|
35
|
+
isError?: boolean;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the FunctionResultBody interface.
|
|
39
|
+
*/
|
|
40
|
+
export declare function instanceOfFunctionResultBody(value: object): value is FunctionResultBody;
|
|
41
|
+
export declare function FunctionResultBodyFromJSON(json: any): FunctionResultBody;
|
|
42
|
+
export declare function FunctionResultBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): FunctionResultBody;
|
|
43
|
+
export declare function FunctionResultBodyToJSON(json: any): FunctionResultBody;
|
|
44
|
+
export declare function FunctionResultBodyToJSONTyped(value?: FunctionResultBody | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Sarvam Agents API
|
|
6
|
+
* Chat with a Sarvam agent, exchange files with it, and set it up (instructions, skills, knowledge bases, connectors, deploy) from your own code. Authenticate with a service token sent as a Bearer token, and send the header X-Panja-Origin: managed_agents on every request.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
* Contact: support@sarvam.ai
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfFunctionResultBody = instanceOfFunctionResultBody;
|
|
17
|
+
exports.FunctionResultBodyFromJSON = FunctionResultBodyFromJSON;
|
|
18
|
+
exports.FunctionResultBodyFromJSONTyped = FunctionResultBodyFromJSONTyped;
|
|
19
|
+
exports.FunctionResultBodyToJSON = FunctionResultBodyToJSON;
|
|
20
|
+
exports.FunctionResultBodyToJSONTyped = FunctionResultBodyToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the FunctionResultBody interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfFunctionResultBody(value) {
|
|
25
|
+
if (!('toolCallId' in value) || value['toolCallId'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('output' in value) || value['output'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
function FunctionResultBodyFromJSON(json) {
|
|
32
|
+
return FunctionResultBodyFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
function FunctionResultBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'toolCallId': json['toolCallId'],
|
|
40
|
+
'output': json['output'],
|
|
41
|
+
'isError': json['isError'] == null ? undefined : json['isError'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function FunctionResultBodyToJSON(json) {
|
|
45
|
+
return FunctionResultBodyToJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
function FunctionResultBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
48
|
+
if (value == null) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
'toolCallId': value['toolCallId'],
|
|
53
|
+
'output': value['output'],
|
|
54
|
+
'isError': value['isError'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
@@ -40,6 +40,18 @@ export interface QueueMessageInput {
|
|
|
40
40
|
* @memberof QueueMessageInput
|
|
41
41
|
*/
|
|
42
42
|
retryOf?: string | null;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof QueueMessageInput
|
|
47
|
+
*/
|
|
48
|
+
surface?: QueueMessageInputSurfaceEnum | null;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof QueueMessageInput
|
|
53
|
+
*/
|
|
54
|
+
endUserId?: string | null;
|
|
43
55
|
}
|
|
44
56
|
/**
|
|
45
57
|
* @export
|
|
@@ -49,6 +61,17 @@ export declare const QueueMessageInputDeliveryEnum: {
|
|
|
49
61
|
readonly Now: "now";
|
|
50
62
|
};
|
|
51
63
|
export type QueueMessageInputDeliveryEnum = typeof QueueMessageInputDeliveryEnum[keyof typeof QueueMessageInputDeliveryEnum];
|
|
64
|
+
/**
|
|
65
|
+
* @export
|
|
66
|
+
*/
|
|
67
|
+
export declare const QueueMessageInputSurfaceEnum: {
|
|
68
|
+
readonly Builder: "builder";
|
|
69
|
+
readonly Playground: "playground";
|
|
70
|
+
readonly Tests: "tests";
|
|
71
|
+
readonly Evals: "evals";
|
|
72
|
+
readonly Cowork: "cowork";
|
|
73
|
+
};
|
|
74
|
+
export type QueueMessageInputSurfaceEnum = typeof QueueMessageInputSurfaceEnum[keyof typeof QueueMessageInputSurfaceEnum];
|
|
52
75
|
/**
|
|
53
76
|
* Check if a given object implements the QueueMessageInput interface.
|
|
54
77
|
*/
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.QueueMessageInputDeliveryEnum = void 0;
|
|
16
|
+
exports.QueueMessageInputSurfaceEnum = exports.QueueMessageInputDeliveryEnum = void 0;
|
|
17
17
|
exports.instanceOfQueueMessageInput = instanceOfQueueMessageInput;
|
|
18
18
|
exports.QueueMessageInputFromJSON = QueueMessageInputFromJSON;
|
|
19
19
|
exports.QueueMessageInputFromJSONTyped = QueueMessageInputFromJSONTyped;
|
|
@@ -27,6 +27,16 @@ exports.QueueMessageInputDeliveryEnum = {
|
|
|
27
27
|
Queue: 'queue',
|
|
28
28
|
Now: 'now'
|
|
29
29
|
};
|
|
30
|
+
/**
|
|
31
|
+
* @export
|
|
32
|
+
*/
|
|
33
|
+
exports.QueueMessageInputSurfaceEnum = {
|
|
34
|
+
Builder: 'builder',
|
|
35
|
+
Playground: 'playground',
|
|
36
|
+
Tests: 'tests',
|
|
37
|
+
Evals: 'evals',
|
|
38
|
+
Cowork: 'cowork'
|
|
39
|
+
};
|
|
30
40
|
/**
|
|
31
41
|
* Check if a given object implements the QueueMessageInput interface.
|
|
32
42
|
*/
|
|
@@ -47,6 +57,8 @@ function QueueMessageInputFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
47
57
|
'delivery': json['delivery'] == null ? undefined : json['delivery'],
|
|
48
58
|
'agentId': json['agentId'] == null ? undefined : json['agentId'],
|
|
49
59
|
'retryOf': json['retryOf'] == null ? undefined : json['retryOf'],
|
|
60
|
+
'surface': json['surface'] == null ? undefined : json['surface'],
|
|
61
|
+
'endUserId': json['endUserId'] == null ? undefined : json['endUserId'],
|
|
50
62
|
};
|
|
51
63
|
}
|
|
52
64
|
function QueueMessageInputToJSON(json) {
|
|
@@ -61,5 +73,7 @@ function QueueMessageInputToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
61
73
|
'delivery': value['delivery'],
|
|
62
74
|
'agentId': value['agentId'],
|
|
63
75
|
'retryOf': value['retryOf'],
|
|
76
|
+
'surface': value['surface'],
|
|
77
|
+
'endUserId': value['endUserId'],
|
|
64
78
|
};
|
|
65
79
|
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sarvam Agents API
|
|
3
|
+
* Chat with a Sarvam agent, exchange files with it, and set it up (instructions, skills, knowledge bases, connectors, deploy) from your own code. Authenticate with a service token sent as a Bearer token, and send the header X-Panja-Origin: managed_agents on every request.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
* Contact: support@sarvam.ai
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* One function call the app must run before the turn can continue.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface RequiredAction
|
|
16
|
+
*/
|
|
17
|
+
export interface RequiredAction {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof RequiredAction
|
|
22
|
+
*/
|
|
23
|
+
type?: RequiredActionTypeEnum;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof RequiredAction
|
|
28
|
+
*/
|
|
29
|
+
requestId: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof RequiredAction
|
|
34
|
+
*/
|
|
35
|
+
toolCallId: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof RequiredAction
|
|
40
|
+
*/
|
|
41
|
+
name: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {{ [key: string]: any; }}
|
|
45
|
+
* @memberof RequiredAction
|
|
46
|
+
*/
|
|
47
|
+
arguments: {
|
|
48
|
+
[key: string]: any;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @type {Date}
|
|
53
|
+
* @memberof RequiredAction
|
|
54
|
+
*/
|
|
55
|
+
createdAt: Date;
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @type {Date}
|
|
59
|
+
* @memberof RequiredAction
|
|
60
|
+
*/
|
|
61
|
+
expiresAt?: Date | null;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* @export
|
|
65
|
+
*/
|
|
66
|
+
export declare const RequiredActionTypeEnum: {
|
|
67
|
+
readonly FunctionCall: "function_call";
|
|
68
|
+
};
|
|
69
|
+
export type RequiredActionTypeEnum = typeof RequiredActionTypeEnum[keyof typeof RequiredActionTypeEnum];
|
|
70
|
+
/**
|
|
71
|
+
* Check if a given object implements the RequiredAction interface.
|
|
72
|
+
*/
|
|
73
|
+
export declare function instanceOfRequiredAction(value: object): value is RequiredAction;
|
|
74
|
+
export declare function RequiredActionFromJSON(json: any): RequiredAction;
|
|
75
|
+
export declare function RequiredActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): RequiredAction;
|
|
76
|
+
export declare function RequiredActionToJSON(json: any): RequiredAction;
|
|
77
|
+
export declare function RequiredActionToJSONTyped(value?: RequiredAction | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Sarvam Agents API
|
|
6
|
+
* Chat with a Sarvam agent, exchange files with it, and set it up (instructions, skills, knowledge bases, connectors, deploy) from your own code. Authenticate with a service token sent as a Bearer token, and send the header X-Panja-Origin: managed_agents on every request.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
* Contact: support@sarvam.ai
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.RequiredActionTypeEnum = void 0;
|
|
17
|
+
exports.instanceOfRequiredAction = instanceOfRequiredAction;
|
|
18
|
+
exports.RequiredActionFromJSON = RequiredActionFromJSON;
|
|
19
|
+
exports.RequiredActionFromJSONTyped = RequiredActionFromJSONTyped;
|
|
20
|
+
exports.RequiredActionToJSON = RequiredActionToJSON;
|
|
21
|
+
exports.RequiredActionToJSONTyped = RequiredActionToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.RequiredActionTypeEnum = {
|
|
26
|
+
FunctionCall: 'function_call'
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Check if a given object implements the RequiredAction interface.
|
|
30
|
+
*/
|
|
31
|
+
function instanceOfRequiredAction(value) {
|
|
32
|
+
if (!('requestId' in value) || value['requestId'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('toolCallId' in value) || value['toolCallId'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if (!('arguments' in value) || value['arguments'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
41
|
+
return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
function RequiredActionFromJSON(json) {
|
|
45
|
+
return RequiredActionFromJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
function RequiredActionFromJSONTyped(json, ignoreDiscriminator) {
|
|
48
|
+
if (json == null) {
|
|
49
|
+
return json;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
'type': json['type'] == null ? undefined : json['type'],
|
|
53
|
+
'requestId': json['requestId'],
|
|
54
|
+
'toolCallId': json['toolCallId'],
|
|
55
|
+
'name': json['name'],
|
|
56
|
+
'arguments': json['arguments'],
|
|
57
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
58
|
+
'expiresAt': json['expiresAt'] == null ? undefined : (new Date(json['expiresAt'])),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function RequiredActionToJSON(json) {
|
|
62
|
+
return RequiredActionToJSONTyped(json, false);
|
|
63
|
+
}
|
|
64
|
+
function RequiredActionToJSONTyped(value, ignoreDiscriminator = false) {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
'type': value['type'],
|
|
70
|
+
'requestId': value['requestId'],
|
|
71
|
+
'toolCallId': value['toolCallId'],
|
|
72
|
+
'name': value['name'],
|
|
73
|
+
'arguments': value['arguments'],
|
|
74
|
+
'createdAt': ((value['createdAt']).toISOString()),
|
|
75
|
+
'expiresAt': value['expiresAt'] == null ? undefined : (value['expiresAt'].toISOString()),
|
|
76
|
+
};
|
|
77
|
+
}
|
|
@@ -34,6 +34,14 @@ export interface ResponseDetail {
|
|
|
34
34
|
* @memberof ResponseDetail
|
|
35
35
|
*/
|
|
36
36
|
output: Array<UIMessage>;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {{ [key: string]: any; }}
|
|
40
|
+
* @memberof ResponseDetail
|
|
41
|
+
*/
|
|
42
|
+
usage?: {
|
|
43
|
+
[key: string]: any;
|
|
44
|
+
} | null;
|
|
37
45
|
/**
|
|
38
46
|
*
|
|
39
47
|
* @type {any}
|
|
@@ -52,6 +52,7 @@ function ResponseDetailFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
52
52
|
'responseId': json['responseId'],
|
|
53
53
|
'status': json['status'],
|
|
54
54
|
'output': (json['output'].map(UIMessage_js_1.UIMessageFromJSON)),
|
|
55
|
+
'usage': json['usage'] == null ? undefined : json['usage'],
|
|
55
56
|
'structuredOutput': json['structuredOutput'] == null ? undefined : json['structuredOutput'],
|
|
56
57
|
'outputErrors': json['outputErrors'] == null ? undefined : json['outputErrors'],
|
|
57
58
|
'outputCitations': json['outputCitations'] == null ? undefined : json['outputCitations'],
|
|
@@ -70,6 +71,7 @@ function ResponseDetailToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
70
71
|
'responseId': value['responseId'],
|
|
71
72
|
'status': value['status'],
|
|
72
73
|
'output': (value['output'].map(UIMessage_js_1.UIMessageToJSON)),
|
|
74
|
+
'usage': value['usage'],
|
|
73
75
|
'structuredOutput': value['structuredOutput'],
|
|
74
76
|
'outputErrors': value['outputErrors'],
|
|
75
77
|
'outputCitations': value['outputCitations'],
|
|
@@ -58,7 +58,30 @@ export interface ResponseInput {
|
|
|
58
58
|
* @memberof ResponseInput
|
|
59
59
|
*/
|
|
60
60
|
retryOf?: string | null;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {string}
|
|
64
|
+
* @memberof ResponseInput
|
|
65
|
+
*/
|
|
66
|
+
surface?: ResponseInputSurfaceEnum | null;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof ResponseInput
|
|
71
|
+
*/
|
|
72
|
+
endUserId?: string | null;
|
|
61
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* @export
|
|
76
|
+
*/
|
|
77
|
+
export declare const ResponseInputSurfaceEnum: {
|
|
78
|
+
readonly Builder: "builder";
|
|
79
|
+
readonly Playground: "playground";
|
|
80
|
+
readonly Tests: "tests";
|
|
81
|
+
readonly Evals: "evals";
|
|
82
|
+
readonly Cowork: "cowork";
|
|
83
|
+
};
|
|
84
|
+
export type ResponseInputSurfaceEnum = typeof ResponseInputSurfaceEnum[keyof typeof ResponseInputSurfaceEnum];
|
|
62
85
|
/**
|
|
63
86
|
* Check if a given object implements the ResponseInput interface.
|
|
64
87
|
*/
|
|
@@ -13,12 +13,23 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ResponseInputSurfaceEnum = void 0;
|
|
16
17
|
exports.instanceOfResponseInput = instanceOfResponseInput;
|
|
17
18
|
exports.ResponseInputFromJSON = ResponseInputFromJSON;
|
|
18
19
|
exports.ResponseInputFromJSONTyped = ResponseInputFromJSONTyped;
|
|
19
20
|
exports.ResponseInputToJSON = ResponseInputToJSON;
|
|
20
21
|
exports.ResponseInputToJSONTyped = ResponseInputToJSONTyped;
|
|
21
22
|
const InputMessage_js_1 = require("./InputMessage.js");
|
|
23
|
+
/**
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.ResponseInputSurfaceEnum = {
|
|
27
|
+
Builder: 'builder',
|
|
28
|
+
Playground: 'playground',
|
|
29
|
+
Tests: 'tests',
|
|
30
|
+
Evals: 'evals',
|
|
31
|
+
Cowork: 'cowork'
|
|
32
|
+
};
|
|
22
33
|
/**
|
|
23
34
|
* Check if a given object implements the ResponseInput interface.
|
|
24
35
|
*/
|
|
@@ -44,6 +55,8 @@ function ResponseInputFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
44
55
|
'agentId': json['agentId'] == null ? undefined : json['agentId'],
|
|
45
56
|
'regenerateAfter': json['regenerateAfter'] == null ? undefined : json['regenerateAfter'],
|
|
46
57
|
'retryOf': json['retryOf'] == null ? undefined : json['retryOf'],
|
|
58
|
+
'surface': json['surface'] == null ? undefined : json['surface'],
|
|
59
|
+
'endUserId': json['endUserId'] == null ? undefined : json['endUserId'],
|
|
47
60
|
};
|
|
48
61
|
}
|
|
49
62
|
function ResponseInputToJSON(json) {
|
|
@@ -61,5 +74,7 @@ function ResponseInputToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
61
74
|
'agentId': value['agentId'],
|
|
62
75
|
'regenerateAfter': value['regenerateAfter'],
|
|
63
76
|
'retryOf': value['retryOf'],
|
|
77
|
+
'surface': value['surface'],
|
|
78
|
+
'endUserId': value['endUserId'],
|
|
64
79
|
};
|
|
65
80
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sarvam Agents API
|
|
3
|
+
* Chat with a Sarvam agent, exchange files with it, and set it up (instructions, skills, knowledge bases, connectors, deploy) from your own code. Authenticate with a service token sent as a Bearer token, and send the header X-Panja-Origin: managed_agents on every request.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
* Contact: support@sarvam.ai
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ToolResults200Response
|
|
16
|
+
*/
|
|
17
|
+
export interface ToolResults200Response {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {boolean}
|
|
21
|
+
* @memberof ToolResults200Response
|
|
22
|
+
*/
|
|
23
|
+
accepted: boolean | null;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {boolean}
|
|
27
|
+
* @memberof ToolResults200Response
|
|
28
|
+
*/
|
|
29
|
+
duplicate: boolean | null;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the ToolResults200Response interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfToolResults200Response(value: object): value is ToolResults200Response;
|
|
35
|
+
export declare function ToolResults200ResponseFromJSON(json: any): ToolResults200Response;
|
|
36
|
+
export declare function ToolResults200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ToolResults200Response;
|
|
37
|
+
export declare function ToolResults200ResponseToJSON(json: any): ToolResults200Response;
|
|
38
|
+
export declare function ToolResults200ResponseToJSONTyped(value?: ToolResults200Response | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Sarvam Agents API
|
|
6
|
+
* Chat with a Sarvam agent, exchange files with it, and set it up (instructions, skills, knowledge bases, connectors, deploy) from your own code. Authenticate with a service token sent as a Bearer token, and send the header X-Panja-Origin: managed_agents on every request.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
* Contact: support@sarvam.ai
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfToolResults200Response = instanceOfToolResults200Response;
|
|
17
|
+
exports.ToolResults200ResponseFromJSON = ToolResults200ResponseFromJSON;
|
|
18
|
+
exports.ToolResults200ResponseFromJSONTyped = ToolResults200ResponseFromJSONTyped;
|
|
19
|
+
exports.ToolResults200ResponseToJSON = ToolResults200ResponseToJSON;
|
|
20
|
+
exports.ToolResults200ResponseToJSONTyped = ToolResults200ResponseToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the ToolResults200Response interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfToolResults200Response(value) {
|
|
25
|
+
if (!('accepted' in value) || value['accepted'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('duplicate' in value) || value['duplicate'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
function ToolResults200ResponseFromJSON(json) {
|
|
32
|
+
return ToolResults200ResponseFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
function ToolResults200ResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'accepted': json['accepted'],
|
|
40
|
+
'duplicate': json['duplicate'],
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function ToolResults200ResponseToJSON(json) {
|
|
44
|
+
return ToolResults200ResponseToJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
function ToolResults200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
47
|
+
if (value == null) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'accepted': value['accepted'],
|
|
52
|
+
'duplicate': value['duplicate'],
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sarvam Agents API
|
|
3
|
+
* Chat with a Sarvam agent, exchange files with it, and set it up (instructions, skills, knowledge bases, connectors, deploy) from your own code. Authenticate with a service token sent as a Bearer token, and send the header X-Panja-Origin: managed_agents on every request.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
* Contact: support@sarvam.ai
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { FunctionResultBody } from './FunctionResultBody.js';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ToolResultsBody
|
|
17
|
+
*/
|
|
18
|
+
export interface ToolResultsBody {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof ToolResultsBody
|
|
23
|
+
*/
|
|
24
|
+
requestId: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {Array<FunctionResultBody>}
|
|
28
|
+
* @memberof ToolResultsBody
|
|
29
|
+
*/
|
|
30
|
+
results: Array<FunctionResultBody>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the ToolResultsBody interface.
|
|
34
|
+
*/
|
|
35
|
+
export declare function instanceOfToolResultsBody(value: object): value is ToolResultsBody;
|
|
36
|
+
export declare function ToolResultsBodyFromJSON(json: any): ToolResultsBody;
|
|
37
|
+
export declare function ToolResultsBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ToolResultsBody;
|
|
38
|
+
export declare function ToolResultsBodyToJSON(json: any): ToolResultsBody;
|
|
39
|
+
export declare function ToolResultsBodyToJSONTyped(value?: ToolResultsBody | null, ignoreDiscriminator?: boolean): any;
|