syllable-sdk 0.1.0-alpha.30 → 0.1.0-alpha.31

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.
Files changed (32) hide show
  1. package/docs/sdks/channels/README.md +0 -3
  2. package/docs/sdks/custommessages/README.md +0 -3
  3. package/docs/sdks/prompts/README.md +0 -3
  4. package/docs/sdks/targets/README.md +0 -3
  5. package/docs/sdks/tools/README.md +0 -3
  6. package/jsr.json +1 -1
  7. package/lib/config.d.ts +2 -2
  8. package/lib/config.js +2 -2
  9. package/mintlify/mint.json +23 -1
  10. package/models/components/agentcreate.d.ts +1 -1
  11. package/models/components/agentupdate.d.ts +1 -1
  12. package/models/components/toolcreaterequest.d.ts +0 -89
  13. package/models/components/toolcreaterequest.d.ts.map +1 -1
  14. package/models/components/toolcreaterequest.js.map +1 -1
  15. package/models/components/tooldefinition.d.ts +0 -89
  16. package/models/components/tooldefinition.d.ts.map +1 -1
  17. package/models/components/tooldefinition.js.map +1 -1
  18. package/models/components/toolresponse.d.ts +0 -89
  19. package/models/components/toolresponse.d.ts.map +1 -1
  20. package/models/components/toolresponse.js.map +1 -1
  21. package/models/components/toolupdaterequest.d.ts +0 -89
  22. package/models/components/toolupdaterequest.d.ts.map +1 -1
  23. package/models/components/toolupdaterequest.js.map +1 -1
  24. package/openapi.json +9 -50
  25. package/package.json +1 -1
  26. package/src/lib/config.ts +2 -2
  27. package/src/models/components/agentcreate.ts +1 -1
  28. package/src/models/components/agentupdate.ts +1 -1
  29. package/src/models/components/toolcreaterequest.ts +0 -89
  30. package/src/models/components/tooldefinition.ts +0 -89
  31. package/src/models/components/toolresponse.ts +0 -89
  32. package/src/models/components/toolupdaterequest.ts +0 -89
@@ -5,9 +5,6 @@
5
5
 
6
6
  Operations related to channel configuration. A channel is an organization-level point of communication, like a phone number or a web chat. A channel can be associated with an agent by creating a channel target linking them.
7
7
 
8
- For more information:
9
- <https://docs.syllable.ai/Resources/Channels>
10
-
11
8
  ### Available Operations
12
9
 
13
10
  * [list](#list) - Get Channels
@@ -5,9 +5,6 @@
5
5
 
6
6
  Operations related to custom message configuration. A custom message is a pre-configured message delivered by an agent as a greeting at the beginning of a conversation. Multiple agents can use the same custom mesasage. A custom message has one or more rules defined, which allow for different messages to be dynamically selected and delivered at runtime based on the current time and either date or day of the week.
7
7
 
8
- For more information:
9
- <https://docs.syllable.ai/Resources/CustomMessages>
10
-
11
8
  ### Available Operations
12
9
 
13
10
  * [list](#list) - Custom Messages List
@@ -5,9 +5,6 @@
5
5
 
6
6
  Operations related to prompts. A prompt defines the behavior of an agent by delivering instructions to the LLM about how the agent should behave. A prompt can be linked to one or more agents. A prompt can also be linked to tools to allow an agent using the prompt to use them.
7
7
 
8
- For more information:
9
- <https://docs.syllable.ai/Resources/res_WritePrompt>
10
-
11
8
  ### Available Operations
12
9
 
13
10
  * [list](#list) - Prompt List
@@ -5,9 +5,6 @@
5
5
 
6
6
  Operations related to channel target configuration. A channel target links a channel to an agent, allowing users to communicate with the agent through that channel.
7
7
 
8
- For more information:
9
- <https://docs.syllable.ai/Resources/Channels>
10
-
11
8
  ### Available Operations
12
9
 
13
10
  * [availableTargets](#availabletargets) - Available Targets List
@@ -5,9 +5,6 @@
5
5
 
6
6
  Operations related to tool configuration. A tool is a function that an agent can call to perform actions like accessing databases, making API calls, or processing data. For an agent to have access to a tool, the prompt associated with that agent should be linked to the tool and include instructions to use it.
7
7
 
8
- For more information:
9
- <https://docs.syllable.ai/Resources/Tools>
10
-
11
8
  ### Available Operations
12
9
 
13
10
  * [list](#list) - Tool List
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "syllable-sdk",
5
- "version": "0.1.0-alpha.30",
5
+ "version": "0.1.0-alpha.31",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/lib/config.d.ts CHANGED
@@ -27,8 +27,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
27
27
  export declare const SDK_METADATA: {
28
28
  readonly language: "typescript";
29
29
  readonly openapiDocVersion: "0.0.2";
30
- readonly sdkVersion: "0.1.0-alpha.30";
30
+ readonly sdkVersion: "0.1.0-alpha.31";
31
31
  readonly genVersion: "2.493.21";
32
- readonly userAgent: "speakeasy-sdk/typescript 0.1.0-alpha.30 2.493.21 0.0.2 syllable-sdk";
32
+ readonly userAgent: "speakeasy-sdk/typescript 0.1.0-alpha.31 2.493.21 0.0.2 syllable-sdk";
33
33
  };
34
34
  //# sourceMappingURL=config.d.ts.map
package/lib/config.js CHANGED
@@ -35,8 +35,8 @@ function serverURLFromOptions(options) {
35
35
  exports.SDK_METADATA = {
36
36
  language: "typescript",
37
37
  openapiDocVersion: "0.0.2",
38
- sdkVersion: "0.1.0-alpha.30",
38
+ sdkVersion: "0.1.0-alpha.31",
39
39
  genVersion: "2.493.21",
40
- userAgent: "speakeasy-sdk/typescript 0.1.0-alpha.30 2.493.21 0.0.2 syllable-sdk",
40
+ userAgent: "speakeasy-sdk/typescript 0.1.0-alpha.31 2.493.21 0.0.2 syllable-sdk",
41
41
  };
42
42
  //# sourceMappingURL=config.js.map
@@ -139,6 +139,7 @@
139
139
  "sdk-docs/models/components/agenttooldefaults",
140
140
  "sdk-docs/models/components/agenttoolfielddefault",
141
141
  "sdk-docs/models/components/agentupdate",
142
+ "sdk-docs/models/components/agentupdatevariables",
142
143
  "sdk-docs/models/components/agentvoice",
143
144
  "sdk-docs/models/components/agentvoicevarname",
144
145
  "sdk-docs/models/components/argumentlocation",
@@ -152,6 +153,7 @@
152
153
  "sdk-docs/models/components/channeltarget",
153
154
  "sdk-docs/models/components/channeltargetcreaterequest",
154
155
  "sdk-docs/models/components/channeltargetproperties",
156
+ "sdk-docs/models/components/channeltargetresponse",
155
157
  "sdk-docs/models/components/channeltargetupdaterequest",
156
158
  "sdk-docs/models/components/contacttags",
157
159
  "sdk-docs/models/components/conversation",
@@ -160,9 +162,11 @@
160
162
  "sdk-docs/models/components/custommessagecreaterequest",
161
163
  "sdk-docs/models/components/custommessageproperties",
162
164
  "sdk-docs/models/components/custommessageresponse",
165
+ "sdk-docs/models/components/custommessagerule",
163
166
  "sdk-docs/models/components/custommessageupdaterequest",
164
167
  "sdk-docs/models/components/daochanneltargetagent",
165
168
  "sdk-docs/models/components/daocustommessagerule",
169
+ "sdk-docs/models/components/dashboard",
166
170
  "sdk-docs/models/components/dayofweek",
167
171
  "sdk-docs/models/components/defaults",
168
172
  "sdk-docs/models/components/definition",
@@ -176,19 +180,23 @@
176
180
  "sdk-docs/models/components/filet",
177
181
  "sdk-docs/models/components/functiont",
178
182
  "sdk-docs/models/components/httpendpoint",
183
+ "sdk-docs/models/components/internaltool",
179
184
  "sdk-docs/models/components/listresponseagentresponse",
180
185
  "sdk-docs/models/components/listresponseavailabletarget",
181
186
  "sdk-docs/models/components/listresponsechannel",
182
187
  "sdk-docs/models/components/listresponsechanneltarget",
188
+ "sdk-docs/models/components/listresponsechanneltargetresponse",
183
189
  "sdk-docs/models/components/listresponseconversation",
184
190
  "sdk-docs/models/components/listresponsecustommessageresponse",
185
191
  "sdk-docs/models/components/listresponsedirectorymember",
186
192
  "sdk-docs/models/components/listresponseevent",
187
193
  "sdk-docs/models/components/listresponseprompt",
194
+ "sdk-docs/models/components/listresponsepromptresponse",
188
195
  "sdk-docs/models/components/listresponseservice",
189
196
  "sdk-docs/models/components/listresponsesession",
190
197
  "sdk-docs/models/components/listresponsesessionlabel",
191
198
  "sdk-docs/models/components/listresponsetool",
199
+ "sdk-docs/models/components/listresponsetoolresponse",
192
200
  "sdk-docs/models/components/llmconfig",
193
201
  "sdk-docs/models/components/loc",
194
202
  "sdk-docs/models/components/method",
@@ -198,9 +206,14 @@
198
206
  "sdk-docs/models/components/parameterst",
199
207
  "sdk-docs/models/components/prompt",
200
208
  "sdk-docs/models/components/promptcreate",
209
+ "sdk-docs/models/components/promptcreaterequest",
201
210
  "sdk-docs/models/components/prompthistory",
211
+ "sdk-docs/models/components/promptllmconfig",
212
+ "sdk-docs/models/components/promptllmprovider",
202
213
  "sdk-docs/models/components/promptproperties",
214
+ "sdk-docs/models/components/promptresponse",
203
215
  "sdk-docs/models/components/promptupdate",
216
+ "sdk-docs/models/components/promptupdaterequest",
204
217
  "sdk-docs/models/components/provider",
205
218
  "sdk-docs/models/components/response",
206
219
  "sdk-docs/models/components/result",
@@ -226,17 +239,26 @@
226
239
  "sdk-docs/models/components/testmessage",
227
240
  "sdk-docs/models/components/testmessageresponse",
228
241
  "sdk-docs/models/components/tool",
242
+ "sdk-docs/models/components/toolargumentlocation",
229
243
  "sdk-docs/models/components/toolcreate",
230
244
  "sdk-docs/models/components/toolcreatedefinition",
245
+ "sdk-docs/models/components/toolcreaterequest",
246
+ "sdk-docs/models/components/tooldefinition",
231
247
  "sdk-docs/models/components/tooldetailresponse",
248
+ "sdk-docs/models/components/toolfunction",
249
+ "sdk-docs/models/components/toolhttpendpoint",
250
+ "sdk-docs/models/components/toolhttpmethod",
232
251
  "sdk-docs/models/components/toolparameterdefault",
233
252
  "sdk-docs/models/components/toolparametertransform",
234
253
  "sdk-docs/models/components/toolparametertransformcondition",
235
254
  "sdk-docs/models/components/toolproperties",
255
+ "sdk-docs/models/components/toolresponse",
236
256
  "sdk-docs/models/components/toolupdate",
237
257
  "sdk-docs/models/components/toolupdatedefinition",
258
+ "sdk-docs/models/components/toolupdaterequest",
238
259
  "sdk-docs/models/components/type",
239
- "sdk-docs/models/components/validationerror"
260
+ "sdk-docs/models/components/validationerror",
261
+ "sdk-docs/models/components/variables"
240
262
  ]
241
263
  },
242
264
  {
@@ -41,7 +41,7 @@ export type AgentCreate = {
41
41
  */
42
42
  languages?: Array<string> | undefined;
43
43
  /**
44
- * Custom context variables for the conversation session. Should be prefixed with "vars.".
44
+ * Custom context variables for the conversation session. Keys should be prefixed with "vars.".
45
45
  */
46
46
  variables: Variables | null;
47
47
  /**
@@ -41,7 +41,7 @@ export type AgentUpdate = {
41
41
  */
42
42
  languages?: Array<string> | undefined;
43
43
  /**
44
- * Custom context variables for the conversation session. Should be prefixed with "vars.".
44
+ * Custom context variables for the conversation session. Keys should be prefixed with "vars.".
45
45
  */
46
46
  variables: AgentUpdateVariables | null;
47
47
  /**
@@ -9,95 +9,6 @@ export type ToolCreateRequest = {
9
9
  name: string;
10
10
  /**
11
11
  * A tool that can be called from an LLM during the conversation.
12
- *
13
- * @remarks
14
- *
15
- * The tool can result in one of the following actions depending on the `type` field:
16
- * - `action`:
17
- * A request to perform an action.
18
- * - `endpoint`:
19
- * An HTTP API call to an external tool. Requires the `endpoint` field to be set too.
20
- * - `context`:
21
- * Sets context variables based on the tool arguments, e.g. to change the session language. Only
22
- * `language` and `say` context vars are currently supported, but this will be made more generic.
23
- *
24
- * For example, to change the current session language:
25
- * {
26
- * "type": "context",
27
- * "tool": {
28
- * "function": {
29
- * "name": "set_language",
30
- * "parameters": {
31
- * "language": {
32
- * "type": "string",
33
- * "description": "The ISO 639 language code to set for the session e.g. 'en-US'."
34
- * },
35
- * "message": {
36
- * "type": "string",
37
- * "description": "Inform the caller we're now speaking in the new language."
38
- * }
39
- * }
40
- * }
41
- * }
42
- * }
43
- *
44
- * If `defaults` is provided, it will be used as the default values for the parameters of the
45
- * tool call, if the LLM doesn't provide them:
46
- * "defaults": {
47
- * "hospital": "Queens Hospital"
48
- * }
49
- *
50
- * Some special "transform" handling is supported if the value is a dict with a single `transform`
51
- * key. The parameter value will be transformed by the given `action` before being used as the
52
- * default value:
53
- *
54
- * Removing an unwanted parameter:
55
- * "defaults": {
56
- * "hospital": {
57
- * "transform": {
58
- * "action": "remove"
59
- * }
60
- * }
61
- * }
62
- *
63
- * Using a value from another parameter and converting it to a dictionary:
64
- * "defaults": {
65
- * "tags.hospital": "{vars.hospital}",
66
- * "tags.foo": "{params.foo}",
67
- * "foo": {
68
- * "transform": {
69
- * "action": "remove"
70
- * }
71
- * }
72
- * }
73
- *
74
- * Add custom parameters from other parameters using Python's `format`:
75
- * "defaults": {
76
- * "hello": {
77
- * "transform": {
78
- * "format": "Hello, {name}!"
79
- * }
80
- * }
81
- * }
82
- *
83
- * Modify a value conditionally, e.g. change a `city` parameter with value "Bronx" to "The Bronx":
84
- * {
85
- * "defaults": {
86
- * "city": {
87
- * "transform": {
88
- * "when": {"operator": "eq", "key": "city", "value": "Bronx"},
89
- * "action": "override",
90
- * "format": "The {city}"
91
- * }
92
- * }
93
- * }
94
- * }
95
- *
96
- * Some common transform actions can be abbreviated using the `@` prefix to support a string syntax:
97
- * "defaults": {
98
- * "foo": "@remove",
99
- * "name": "@override Hello, {name}!"
100
- * }
101
12
  */
102
13
  definition: ToolDefinition;
103
14
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"toolcreaterequest.d.ts","sourceRoot":"","sources":["../../src/models/components/toolcreaterequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,cAAc,EAEd,uBAAuB,EAExB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2FG;IACH,UAAU,EAAE,cAAc,CAAC;IAC3B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,+BAA+B,EAAE,CAAC,CAAC,OAAO,CACrD,iBAAiB,EACjB,CAAC,CAAC,UAAU,EACZ,OAAO,CASP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,uBAAuB,CAAC;IACpC,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,gCAAgC,EAAE,CAAC,CAAC,OAAO,CACtD,0BAA0B,EAC1B,CAAC,CAAC,UAAU,EACZ,iBAAiB,CASjB,CAAC;AAEH;;;GAGG;AACH,yBAAiB,kBAAkB,CAAC;IAClC,iEAAiE;IAC1D,MAAM,aAAa,qDAAkC,CAAC;IAC7D,kEAAkE;IAC3D,MAAM,cAAc,wEAAmC,CAAC;IAC/D,4DAA4D;IAC5D,KAAY,QAAQ,GAAG,0BAA0B,CAAC;CACnD;AAED,wBAAgB,uBAAuB,CACrC,iBAAiB,EAAE,iBAAiB,GACnC,MAAM,CAIR;AAED,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,CAMxD"}
1
+ {"version":3,"file":"toolcreaterequest.d.ts","sourceRoot":"","sources":["../../src/models/components/toolcreaterequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,cAAc,EAEd,uBAAuB,EAExB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,EAAE,cAAc,CAAC;IAC3B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,+BAA+B,EAAE,CAAC,CAAC,OAAO,CACrD,iBAAiB,EACjB,CAAC,CAAC,UAAU,EACZ,OAAO,CASP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,uBAAuB,CAAC;IACpC,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,gCAAgC,EAAE,CAAC,CAAC,OAAO,CACtD,0BAA0B,EAC1B,CAAC,CAAC,UAAU,EACZ,iBAAiB,CASjB,CAAC;AAEH;;;GAGG;AACH,yBAAiB,kBAAkB,CAAC;IAClC,iEAAiE;IAC1D,MAAM,aAAa,qDAAkC,CAAC;IAC7D,kEAAkE;IAC3D,MAAM,cAAc,wEAAmC,CAAC;IAC/D,4DAA4D;IAC5D,KAAY,QAAQ,GAAG,0BAA0B,CAAC;CACnD;AAED,wBAAgB,uBAAuB,CACrC,iBAAiB,EAAE,iBAAiB,GACnC,MAAM,CAIR;AAED,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,CAMxD"}
@@ -1 +1 @@
1
- {"version":3,"file":"toolcreaterequest.js","sourceRoot":"","sources":["../../src/models/components/toolcreaterequest.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAwKH,0DAMC;AAED,8DAQC;AAtLD,uCAAyB;AACzB,2DAA0D;AAC1D,qDAAiD;AAGjD,2DAK6B;AA0G7B,gBAAgB;AACH,QAAA,+BAA+B,GAIxC,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,UAAU,EAAE,gDAA4B;IACxC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;CAC7B,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,YAAY,EAAE,WAAW;KAC1B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AASH,gBAAgB;AACH,QAAA,gCAAgC,GAIzC,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,UAAU,EAAE,iDAA6B;IACzC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;CAC5B,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,SAAS,EAAE,YAAY;KACxB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,kBAAkB,CAOlC;AAPD,WAAiB,kBAAkB;IACjC,iEAAiE;IACpD,gCAAa,GAAG,uCAA+B,CAAC;IAC7D,kEAAkE;IACrD,iCAAc,GAAG,wCAAgC,CAAC;AAGjE,CAAC,EAPgB,kBAAkB,kCAAlB,kBAAkB,QAOlC;AAED,SAAgB,uBAAuB,CACrC,iBAAoC;IAEpC,OAAO,IAAI,CAAC,SAAS,CACnB,wCAAgC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAC1D,CAAC;AACJ,CAAC;AAED,SAAgB,yBAAyB,CACvC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,uCAA+B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC3D,+CAA+C,CAChD,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"toolcreaterequest.js","sourceRoot":"","sources":["../../src/models/components/toolcreaterequest.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AA+EH,0DAMC;AAED,8DAQC;AA7FD,uCAAyB;AACzB,2DAA0D;AAC1D,qDAAiD;AAGjD,2DAK6B;AAiB7B,gBAAgB;AACH,QAAA,+BAA+B,GAIxC,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,UAAU,EAAE,gDAA4B;IACxC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;CAC7B,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,YAAY,EAAE,WAAW;KAC1B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AASH,gBAAgB;AACH,QAAA,gCAAgC,GAIzC,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,UAAU,EAAE,iDAA6B;IACzC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;CAC5B,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,SAAS,EAAE,YAAY;KACxB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,kBAAkB,CAOlC;AAPD,WAAiB,kBAAkB;IACjC,iEAAiE;IACpD,gCAAa,GAAG,uCAA+B,CAAC;IAC7D,kEAAkE;IACrD,iCAAc,GAAG,wCAAgC,CAAC;AAGjE,CAAC,EAPgB,kBAAkB,kCAAlB,kBAAkB,QAOlC;AAED,SAAgB,uBAAuB,CACrC,iBAAoC;IAEpC,OAAO,IAAI,CAAC,SAAS,CACnB,wCAAgC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAC1D,CAAC;AACJ,CAAC;AAED,SAAgB,yBAAyB,CACvC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,uCAA+B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC3D,+CAA+C,CAChD,CAAC;AACJ,CAAC"}
@@ -22,95 +22,6 @@ export type Defaults = One | {
22
22
  export type Result = {};
23
23
  /**
24
24
  * A tool that can be called from an LLM during the conversation.
25
- *
26
- * @remarks
27
- *
28
- * The tool can result in one of the following actions depending on the `type` field:
29
- * - `action`:
30
- * A request to perform an action.
31
- * - `endpoint`:
32
- * An HTTP API call to an external tool. Requires the `endpoint` field to be set too.
33
- * - `context`:
34
- * Sets context variables based on the tool arguments, e.g. to change the session language. Only
35
- * `language` and `say` context vars are currently supported, but this will be made more generic.
36
- *
37
- * For example, to change the current session language:
38
- * {
39
- * "type": "context",
40
- * "tool": {
41
- * "function": {
42
- * "name": "set_language",
43
- * "parameters": {
44
- * "language": {
45
- * "type": "string",
46
- * "description": "The ISO 639 language code to set for the session e.g. 'en-US'."
47
- * },
48
- * "message": {
49
- * "type": "string",
50
- * "description": "Inform the caller we're now speaking in the new language."
51
- * }
52
- * }
53
- * }
54
- * }
55
- * }
56
- *
57
- * If `defaults` is provided, it will be used as the default values for the parameters of the
58
- * tool call, if the LLM doesn't provide them:
59
- * "defaults": {
60
- * "hospital": "Queens Hospital"
61
- * }
62
- *
63
- * Some special "transform" handling is supported if the value is a dict with a single `transform`
64
- * key. The parameter value will be transformed by the given `action` before being used as the
65
- * default value:
66
- *
67
- * Removing an unwanted parameter:
68
- * "defaults": {
69
- * "hospital": {
70
- * "transform": {
71
- * "action": "remove"
72
- * }
73
- * }
74
- * }
75
- *
76
- * Using a value from another parameter and converting it to a dictionary:
77
- * "defaults": {
78
- * "tags.hospital": "{vars.hospital}",
79
- * "tags.foo": "{params.foo}",
80
- * "foo": {
81
- * "transform": {
82
- * "action": "remove"
83
- * }
84
- * }
85
- * }
86
- *
87
- * Add custom parameters from other parameters using Python's `format`:
88
- * "defaults": {
89
- * "hello": {
90
- * "transform": {
91
- * "format": "Hello, {name}!"
92
- * }
93
- * }
94
- * }
95
- *
96
- * Modify a value conditionally, e.g. change a `city` parameter with value "Bronx" to "The Bronx":
97
- * {
98
- * "defaults": {
99
- * "city": {
100
- * "transform": {
101
- * "when": {"operator": "eq", "key": "city", "value": "Bronx"},
102
- * "action": "override",
103
- * "format": "The {city}"
104
- * }
105
- * }
106
- * }
107
- * }
108
- *
109
- * Some common transform actions can be abbreviated using the `@` prefix to support a string syntax:
110
- * "defaults": {
111
- * "foo": "@remove",
112
- * "name": "@override Hello, {name}!"
113
- * }
114
25
  */
115
26
  export type ToolDefinition = {
116
27
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"tooldefinition.d.ts","sourceRoot":"","sources":["../../src/models/components/tooldefinition.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,YAAY,EAEZ,qBAAqB,EAEtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,gBAAgB,EAEhB,yBAAyB,EAE1B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,oBAAoB,EAEpB,6BAA6B,EAE9B,MAAM,2BAA2B,CAAC;AAEnC,eAAO,MAAM,IAAI;;;;;CAKP,CAAC;AACX,MAAM,MAAM,IAAI,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC;AAE3C,MAAM,MAAM,GAAG,GAAG,EAAE,CAAC;AAErB;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,GAAG,GAAG;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,oBAAoB,CAAA;CAAE,CAAC;AAEnE,MAAM,MAAM,MAAM,GAAG,EAAE,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2FG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;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AAE,CAAC,CAAC,QAAQ,CAAC,qDAA+B,CAAC,CAAC,QAAQ,EAAE;IAChE,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAClB,CAAC,CAAC,KAAK,CAAC;QACN,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,0BAAkB,CAAC;QAChC,CAAC,CAAC,MAAM,CAAC,6DAAmC,CAAC;KAC9C,CAAC,CACH,CAAC,QAAQ,EAAE;IACZ,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,6BAAqB,CAAC,CAAC,CAAC,QAAQ,EAAE;CACnE,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,eAAe,CAO/B;AAPD,WAAiB,eAAe;IAC9B,8DAA8D;IACjD,6BAAa,GAAG,oCAA4B,CAAC;IAC1D,+DAA+D;IAClD,8BAAc,GAAG,qCAA6B,CAAC;AAG9D,CAAC,EAPgB,eAAe,+BAAf,eAAe,QAO/B;AAED,SAAgB,oBAAoB,CAAC,cAA8B;IACjE,OAAO,IAAI,CAAC,SAAS,CAAC,qCAA6B,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC;AAC7E,CAAC;AAED,SAAgB,sBAAsB,CACpC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,oCAA4B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACxD,4CAA4C,CAC7C,CAAC;AACJ,CAAC"}
@@ -16,95 +16,6 @@ export type ToolResponse = {
16
16
  name: string;
17
17
  /**
18
18
  * A tool that can be called from an LLM during the conversation.
19
- *
20
- * @remarks
21
- *
22
- * The tool can result in one of the following actions depending on the `type` field:
23
- * - `action`:
24
- * A request to perform an action.
25
- * - `endpoint`:
26
- * An HTTP API call to an external tool. Requires the `endpoint` field to be set too.
27
- * - `context`:
28
- * Sets context variables based on the tool arguments, e.g. to change the session language. Only
29
- * `language` and `say` context vars are currently supported, but this will be made more generic.
30
- *
31
- * For example, to change the current session language:
32
- * {
33
- * "type": "context",
34
- * "tool": {
35
- * "function": {
36
- * "name": "set_language",
37
- * "parameters": {
38
- * "language": {
39
- * "type": "string",
40
- * "description": "The ISO 639 language code to set for the session e.g. 'en-US'."
41
- * },
42
- * "message": {
43
- * "type": "string",
44
- * "description": "Inform the caller we're now speaking in the new language."
45
- * }
46
- * }
47
- * }
48
- * }
49
- * }
50
- *
51
- * If `defaults` is provided, it will be used as the default values for the parameters of the
52
- * tool call, if the LLM doesn't provide them:
53
- * "defaults": {
54
- * "hospital": "Queens Hospital"
55
- * }
56
- *
57
- * Some special "transform" handling is supported if the value is a dict with a single `transform`
58
- * key. The parameter value will be transformed by the given `action` before being used as the
59
- * default value:
60
- *
61
- * Removing an unwanted parameter:
62
- * "defaults": {
63
- * "hospital": {
64
- * "transform": {
65
- * "action": "remove"
66
- * }
67
- * }
68
- * }
69
- *
70
- * Using a value from another parameter and converting it to a dictionary:
71
- * "defaults": {
72
- * "tags.hospital": "{vars.hospital}",
73
- * "tags.foo": "{params.foo}",
74
- * "foo": {
75
- * "transform": {
76
- * "action": "remove"
77
- * }
78
- * }
79
- * }
80
- *
81
- * Add custom parameters from other parameters using Python's `format`:
82
- * "defaults": {
83
- * "hello": {
84
- * "transform": {
85
- * "format": "Hello, {name}!"
86
- * }
87
- * }
88
- * }
89
- *
90
- * Modify a value conditionally, e.g. change a `city` parameter with value "Bronx" to "The Bronx":
91
- * {
92
- * "defaults": {
93
- * "city": {
94
- * "transform": {
95
- * "when": {"operator": "eq", "key": "city", "value": "Bronx"},
96
- * "action": "override",
97
- * "format": "The {city}"
98
- * }
99
- * }
100
- * }
101
- * }
102
- *
103
- * Some common transform actions can be abbreviated using the `@` prefix to support a string syntax:
104
- * "defaults": {
105
- * "foo": "@remove",
106
- * "name": "@override Hello, {name}!"
107
- * }
108
19
  */
109
20
  definition: ToolDefinition;
110
21
  /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AGG;AACH,yBAAiB,aAAa,CAAC;IAC7B,4DAA4D;IACrD,MAAM,aAAa,gDAA6B,CAAC;IACxD,6DAA6D;IACtD,MAAM,cAAc,8DAA8B,CAAC;IAC1D,uDAAuD;IACvD,KAAY,QAAQ,GAAG,qBAAqB,CAAC;CAC9C;AAED,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,YAAY,GAAG,MAAM,CAErE;AAED,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAMnD"}
1
+ {"version":3,"file":"toolresponse.d.ts","sourceRoot":"","sources":["../../src/models/components/toolresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,cAAc,EAEd,uBAAuB,EAExB,MAAM,qBAAqB,CAAC;AAE7B;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,EAAE,cAAc,CAAC;IAC3B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACzC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,0BAA0B,EAAE,CAAC,CAAC,OAAO,CAChD,YAAY,EACZ,CAAC,CAAC,UAAU,EACZ,OAAO,CAYP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,uBAAuB,CAAC;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,EAAE,E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C;AAEH;;;GAGG;AACH,IAAiB,aAAa,CAO7B;AAPD,WAAiB,aAAa;IAC5B,4DAA4D;IAC/C,2BAAa,GAAG,kCAA0B,CAAC;IACxD,6DAA6D;IAChD,4BAAc,GAAG,mCAA2B,CAAC;AAG5D,CAAC,EAPgB,aAAa,6BAAb,aAAa,QAO7B;AAED,SAAgB,kBAAkB,CAAC,YAA0B;IAC3D,OAAO,IAAI,CAAC,SAAS,CAAC,mCAA2B,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;AACzE,CAAC;AAED,SAAgB,oBAAoB,CAClC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,kCAA0B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACtD,0CAA0C,CAC3C,CAAC;AACJ,CAAC"}
@@ -9,95 +9,6 @@ export type ToolUpdateRequest = {
9
9
  name: string;
10
10
  /**
11
11
  * A tool that can be called from an LLM during the conversation.
12
- *
13
- * @remarks
14
- *
15
- * The tool can result in one of the following actions depending on the `type` field:
16
- * - `action`:
17
- * A request to perform an action.
18
- * - `endpoint`:
19
- * An HTTP API call to an external tool. Requires the `endpoint` field to be set too.
20
- * - `context`:
21
- * Sets context variables based on the tool arguments, e.g. to change the session language. Only
22
- * `language` and `say` context vars are currently supported, but this will be made more generic.
23
- *
24
- * For example, to change the current session language:
25
- * {
26
- * "type": "context",
27
- * "tool": {
28
- * "function": {
29
- * "name": "set_language",
30
- * "parameters": {
31
- * "language": {
32
- * "type": "string",
33
- * "description": "The ISO 639 language code to set for the session e.g. 'en-US'."
34
- * },
35
- * "message": {
36
- * "type": "string",
37
- * "description": "Inform the caller we're now speaking in the new language."
38
- * }
39
- * }
40
- * }
41
- * }
42
- * }
43
- *
44
- * If `defaults` is provided, it will be used as the default values for the parameters of the
45
- * tool call, if the LLM doesn't provide them:
46
- * "defaults": {
47
- * "hospital": "Queens Hospital"
48
- * }
49
- *
50
- * Some special "transform" handling is supported if the value is a dict with a single `transform`
51
- * key. The parameter value will be transformed by the given `action` before being used as the
52
- * default value:
53
- *
54
- * Removing an unwanted parameter:
55
- * "defaults": {
56
- * "hospital": {
57
- * "transform": {
58
- * "action": "remove"
59
- * }
60
- * }
61
- * }
62
- *
63
- * Using a value from another parameter and converting it to a dictionary:
64
- * "defaults": {
65
- * "tags.hospital": "{vars.hospital}",
66
- * "tags.foo": "{params.foo}",
67
- * "foo": {
68
- * "transform": {
69
- * "action": "remove"
70
- * }
71
- * }
72
- * }
73
- *
74
- * Add custom parameters from other parameters using Python's `format`:
75
- * "defaults": {
76
- * "hello": {
77
- * "transform": {
78
- * "format": "Hello, {name}!"
79
- * }
80
- * }
81
- * }
82
- *
83
- * Modify a value conditionally, e.g. change a `city` parameter with value "Bronx" to "The Bronx":
84
- * {
85
- * "defaults": {
86
- * "city": {
87
- * "transform": {
88
- * "when": {"operator": "eq", "key": "city", "value": "Bronx"},
89
- * "action": "override",
90
- * "format": "The {city}"
91
- * }
92
- * }
93
- * }
94
- * }
95
- *
96
- * Some common transform actions can be abbreviated using the `@` prefix to support a string syntax:
97
- * "defaults": {
98
- * "foo": "@remove",
99
- * "name": "@override Hello, {name}!"
100
- * }
101
12
  */
102
13
  definition: ToolDefinition;
103
14
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"toolupdaterequest.d.ts","sourceRoot":"","sources":["../../src/models/components/toolupdaterequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,cAAc,EAEd,uBAAuB,EAExB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;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iBAAoC;IAEpC,OAAO,IAAI,CAAC,SAAS,CACnB,wCAAgC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAC1D,CAAC;AACJ,CAAC;AAED,SAAgB,yBAAyB,CACvC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,uCAA+B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC3D,+CAA+C,CAChD,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"toolupdaterequest.js","sourceRoot":"","sources":["../../src/models/components/toolupdaterequest.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAsFH,0DAMC;AAED,8DAQC;AApGD,uCAAyB;AACzB,2DAA0D;AAC1D,qDAAiD;AAGjD,2DAK6B;AAqB7B,gBAAgB;AACH,QAAA,+BAA+B,GAIxC,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,UAAU,EAAE,gDAA4B;IACxC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC5B,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;CACrB,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,YAAY,EAAE,WAAW;KAC1B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAUH,gBAAgB;AACH,QAAA,gCAAgC,GAIzC,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,UAAU,EAAE,iDAA6B;IACzC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC3B,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;CACrB,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,SAAS,EAAE,YAAY;KACxB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,kBAAkB,CAOlC;AAPD,WAAiB,kBAAkB;IACjC,iEAAiE;IACpD,gCAAa,GAAG,uCAA+B,CAAC;IAC7D,kEAAkE;IACrD,iCAAc,GAAG,wCAAgC,CAAC;AAGjE,CAAC,EAPgB,kBAAkB,kCAAlB,kBAAkB,QAOlC;AAED,SAAgB,uBAAuB,CACrC,iBAAoC;IAEpC,OAAO,IAAI,CAAC,SAAS,CACnB,wCAAgC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAC1D,CAAC;AACJ,CAAC;AAED,SAAgB,yBAAyB,CACvC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,uCAA+B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC3D,+CAA+C,CAChD,CAAC;AACJ,CAAC"}
package/openapi.json CHANGED
@@ -4357,12 +4357,7 @@
4357
4357
  }
4358
4358
  ],
4359
4359
  "title": "Variables",
4360
- "description": "Custom context variables for the conversation session. Should be prefixed with \"vars.\".",
4361
- "examples": [
4362
- {
4363
- "vars.hospital": "Weill Cornell Medical Center"
4364
- }
4365
- ]
4360
+ "description": "Custom context variables for the conversation session. Keys should be prefixed with \"vars.\"."
4366
4361
  },
4367
4362
  "tool_headers": {
4368
4363
  "anyOf": [
@@ -4733,12 +4728,7 @@
4733
4728
  }
4734
4729
  ],
4735
4730
  "title": "Variables",
4736
- "description": "Custom context variables for the conversation session. Should be prefixed with \"vars.\".",
4737
- "examples": [
4738
- {
4739
- "vars.hospital": "Weill Cornell Medical Center"
4740
- }
4741
- ]
4731
+ "description": "Custom context variables for the conversation session. Keys should be prefixed with \"vars.\"."
4742
4732
  },
4743
4733
  "tool_headers": {
4744
4734
  "anyOf": [
@@ -5978,18 +5968,7 @@
5978
5968
  }
5979
5969
  ],
5980
5970
  "title": "Attributes",
5981
- "description": "Arbitrary additional metadata for the event",
5982
- "examples": [
5983
- {
5984
- "contact_type": "operator",
5985
- "duration_s": 60,
5986
- "end_time": "2024-05-20T15:31:00.000+00:00",
5987
- "name": "Operator",
5988
- "outcome": "success",
5989
- "phone": "+18042221111",
5990
- "start_time": "2024-05-20T15:30:00.000+00:00"
5991
- }
5992
- ]
5971
+ "description": "Arbitrary additional metadata for the event"
5993
5972
  }
5994
5973
  },
5995
5974
  "type": "object",
@@ -8050,7 +8029,7 @@
8050
8029
  "tool"
8051
8030
  ],
8052
8031
  "title": "ToolDefinition",
8053
- "description": "A tool that can be called from an LLM during the conversation.\n\nThe tool can result in one of the following actions depending on the `type` field:\n- `action`:\n A request to perform an action.\n- `endpoint`:\n An HTTP API call to an external tool. Requires the `endpoint` field to be set too.\n- `context`:\n Sets context variables based on the tool arguments, e.g. to change the session language. Only\n `language` and `say` context vars are currently supported, but this will be made more generic.\n\nFor example, to change the current session language:\n{\n \"type\": \"context\",\n \"tool\": {\n \"function\": {\n \"name\": \"set_language\",\n \"parameters\": {\n \"language\": {\n \"type\": \"string\",\n \"description\": \"The ISO 639 language code to set for the session e.g. 'en-US'.\"\n },\n \"message\": {\n \"type\": \"string\",\n \"description\": \"Inform the caller we're now speaking in the new language.\"\n }\n }\n }\n }\n}\n\nIf `defaults` is provided, it will be used as the default values for the parameters of the\ntool call, if the LLM doesn't provide them:\n\"defaults\": {\n \"hospital\": \"Queens Hospital\"\n}\n\nSome special \"transform\" handling is supported if the value is a dict with a single `transform`\nkey. The parameter value will be transformed by the given `action` before being used as the\ndefault value:\n\nRemoving an unwanted parameter:\n\"defaults\": {\n \"hospital\": {\n \"transform\": {\n \"action\": \"remove\"\n }\n }\n}\n\nUsing a value from another parameter and converting it to a dictionary:\n\"defaults\": {\n \"tags.hospital\": \"{vars.hospital}\",\n \"tags.foo\": \"{params.foo}\",\n \"foo\": {\n \"transform\": {\n \"action\": \"remove\"\n }\n }\n}\n\nAdd custom parameters from other parameters using Python's `format`:\n\"defaults\": {\n \"hello\": {\n \"transform\": {\n \"format\": \"Hello, {name}!\"\n }\n }\n}\n\nModify a value conditionally, e.g. change a `city` parameter with value \"Bronx\" to \"The Bronx\":\n{\n \"defaults\": {\n \"city\": {\n \"transform\": {\n \"when\": {\"operator\": \"eq\", \"key\": \"city\", \"value\": \"Bronx\"},\n \"action\": \"override\",\n \"format\": \"The {city}\"\n }\n }\n }\n}\n\nSome common transform actions can be abbreviated using the `@` prefix to support a string syntax:\n\"defaults\": {\n \"foo\": \"@remove\",\n \"name\": \"@override Hello, {name}!\"\n}"
8032
+ "description": "A tool that can be called from an LLM during the conversation."
8054
8033
  },
8055
8034
  "ToolDetailResponse": {
8056
8035
  "properties": {
@@ -8383,19 +8362,11 @@
8383
8362
  },
8384
8363
  {
8385
8364
  "name": "channels",
8386
- "description": "Operations related to channel configuration. A channel is an organization-level point of communication, like a phone number or a web chat. A channel can be associated with an agent by creating a channel target linking them.",
8387
- "externalDocs": {
8388
- "description": "For more information:",
8389
- "url": "https://docs.syllable.ai/Resources/Channels"
8390
- }
8365
+ "description": "Operations related to channel configuration. A channel is an organization-level point of communication, like a phone number or a web chat. A channel can be associated with an agent by creating a channel target linking them."
8391
8366
  },
8392
8367
  {
8393
8368
  "name": "channels.targets",
8394
- "description": "Operations related to channel target configuration. A channel target links a channel to an agent, allowing users to communicate with the agent through that channel.",
8395
- "externalDocs": {
8396
- "description": "For more information:",
8397
- "url": "https://docs.syllable.ai/Resources/Channels"
8398
- }
8369
+ "description": "Operations related to channel target configuration. A channel target links a channel to an agent, allowing users to communicate with the agent through that channel."
8399
8370
  },
8400
8371
  {
8401
8372
  "name": "conversations",
@@ -8403,11 +8374,7 @@
8403
8374
  },
8404
8375
  {
8405
8376
  "name": "custom_messages",
8406
- "description": "Operations related to custom message configuration. A custom message is a pre-configured message delivered by an agent as a greeting at the beginning of a conversation. Multiple agents can use the same custom mesasage. A custom message has one or more rules defined, which allow for different messages to be dynamically selected and delivered at runtime based on the current time and either date or day of the week.",
8407
- "externalDocs": {
8408
- "description": "For more information:",
8409
- "url": "https://docs.syllable.ai/Resources/CustomMessages"
8410
- }
8377
+ "description": "Operations related to custom message configuration. A custom message is a pre-configured message delivered by an agent as a greeting at the beginning of a conversation. Multiple agents can use the same custom mesasage. A custom message has one or more rules defined, which allow for different messages to be dynamically selected and delivered at runtime based on the current time and either date or day of the week."
8411
8378
  },
8412
8379
  {
8413
8380
  "name": "dashboards",
@@ -8423,11 +8390,7 @@
8423
8390
  },
8424
8391
  {
8425
8392
  "name": "prompts",
8426
- "description": "Operations related to prompts. A prompt defines the behavior of an agent by delivering instructions to the LLM about how the agent should behave. A prompt can be linked to one or more agents. A prompt can also be linked to tools to allow an agent using the prompt to use them.",
8427
- "externalDocs": {
8428
- "description": "For more information:",
8429
- "url": "https://docs.syllable.ai/Resources/res_WritePrompt"
8430
- }
8393
+ "description": "Operations related to prompts. A prompt defines the behavior of an agent by delivering instructions to the LLM about how the agent should behave. A prompt can be linked to one or more agents. A prompt can also be linked to tools to allow an agent using the prompt to use them."
8431
8394
  },
8432
8395
  {
8433
8396
  "name": "services",
@@ -8443,11 +8406,7 @@
8443
8406
  },
8444
8407
  {
8445
8408
  "name": "tools",
8446
- "description": "Operations related to tool configuration. A tool is a function that an agent can call to perform actions like accessing databases, making API calls, or processing data. For an agent to have access to a tool, the prompt associated with that agent should be linked to the tool and include instructions to use it.",
8447
- "externalDocs": {
8448
- "description": "For more information:",
8449
- "url": "https://docs.syllable.ai/Resources/Tools"
8450
- }
8409
+ "description": "Operations related to tool configuration. A tool is a function that an agent can call to perform actions like accessing databases, making API calls, or processing data. For an agent to have access to a tool, the prompt associated with that agent should be linked to the tool and include instructions to use it."
8451
8410
  }
8452
8411
  ],
8453
8412
  "x-speakeasy-name-override": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "syllable-sdk",
3
- "version": "0.1.0-alpha.30",
3
+ "version": "0.1.0-alpha.31",
4
4
  "author": "Speakeasy",
5
5
  "main": "./index.js",
6
6
  "sideEffects": false,
package/src/lib/config.ts CHANGED
@@ -61,8 +61,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
61
61
  export const SDK_METADATA = {
62
62
  language: "typescript",
63
63
  openapiDocVersion: "0.0.2",
64
- sdkVersion: "0.1.0-alpha.30",
64
+ sdkVersion: "0.1.0-alpha.31",
65
65
  genVersion: "2.493.21",
66
66
  userAgent:
67
- "speakeasy-sdk/typescript 0.1.0-alpha.30 2.493.21 0.0.2 syllable-sdk",
67
+ "speakeasy-sdk/typescript 0.1.0-alpha.31 2.493.21 0.0.2 syllable-sdk",
68
68
  } as const;
@@ -54,7 +54,7 @@ export type AgentCreate = {
54
54
  */
55
55
  languages?: Array<string> | undefined;
56
56
  /**
57
- * Custom context variables for the conversation session. Should be prefixed with "vars.".
57
+ * Custom context variables for the conversation session. Keys should be prefixed with "vars.".
58
58
  */
59
59
  variables: Variables | null;
60
60
  /**
@@ -54,7 +54,7 @@ export type AgentUpdate = {
54
54
  */
55
55
  languages?: Array<string> | undefined;
56
56
  /**
57
- * Custom context variables for the conversation session. Should be prefixed with "vars.".
57
+ * Custom context variables for the conversation session. Keys should be prefixed with "vars.".
58
58
  */
59
59
  variables: AgentUpdateVariables | null;
60
60
  /**
@@ -21,95 +21,6 @@ export type ToolCreateRequest = {
21
21
  name: string;
22
22
  /**
23
23
  * A tool that can be called from an LLM during the conversation.
24
- *
25
- * @remarks
26
- *
27
- * The tool can result in one of the following actions depending on the `type` field:
28
- * - `action`:
29
- * A request to perform an action.
30
- * - `endpoint`:
31
- * An HTTP API call to an external tool. Requires the `endpoint` field to be set too.
32
- * - `context`:
33
- * Sets context variables based on the tool arguments, e.g. to change the session language. Only
34
- * `language` and `say` context vars are currently supported, but this will be made more generic.
35
- *
36
- * For example, to change the current session language:
37
- * {
38
- * "type": "context",
39
- * "tool": {
40
- * "function": {
41
- * "name": "set_language",
42
- * "parameters": {
43
- * "language": {
44
- * "type": "string",
45
- * "description": "The ISO 639 language code to set for the session e.g. 'en-US'."
46
- * },
47
- * "message": {
48
- * "type": "string",
49
- * "description": "Inform the caller we're now speaking in the new language."
50
- * }
51
- * }
52
- * }
53
- * }
54
- * }
55
- *
56
- * If `defaults` is provided, it will be used as the default values for the parameters of the
57
- * tool call, if the LLM doesn't provide them:
58
- * "defaults": {
59
- * "hospital": "Queens Hospital"
60
- * }
61
- *
62
- * Some special "transform" handling is supported if the value is a dict with a single `transform`
63
- * key. The parameter value will be transformed by the given `action` before being used as the
64
- * default value:
65
- *
66
- * Removing an unwanted parameter:
67
- * "defaults": {
68
- * "hospital": {
69
- * "transform": {
70
- * "action": "remove"
71
- * }
72
- * }
73
- * }
74
- *
75
- * Using a value from another parameter and converting it to a dictionary:
76
- * "defaults": {
77
- * "tags.hospital": "{vars.hospital}",
78
- * "tags.foo": "{params.foo}",
79
- * "foo": {
80
- * "transform": {
81
- * "action": "remove"
82
- * }
83
- * }
84
- * }
85
- *
86
- * Add custom parameters from other parameters using Python's `format`:
87
- * "defaults": {
88
- * "hello": {
89
- * "transform": {
90
- * "format": "Hello, {name}!"
91
- * }
92
- * }
93
- * }
94
- *
95
- * Modify a value conditionally, e.g. change a `city` parameter with value "Bronx" to "The Bronx":
96
- * {
97
- * "defaults": {
98
- * "city": {
99
- * "transform": {
100
- * "when": {"operator": "eq", "key": "city", "value": "Bronx"},
101
- * "action": "override",
102
- * "format": "The {city}"
103
- * }
104
- * }
105
- * }
106
- * }
107
- *
108
- * Some common transform actions can be abbreviated using the `@` prefix to support a string syntax:
109
- * "defaults": {
110
- * "foo": "@remove",
111
- * "name": "@override Hello, {name}!"
112
- * }
113
24
  */
114
25
  definition: ToolDefinition;
115
26
  /**
@@ -45,95 +45,6 @@ export type Result = {};
45
45
 
46
46
  /**
47
47
  * A tool that can be called from an LLM during the conversation.
48
- *
49
- * @remarks
50
- *
51
- * The tool can result in one of the following actions depending on the `type` field:
52
- * - `action`:
53
- * A request to perform an action.
54
- * - `endpoint`:
55
- * An HTTP API call to an external tool. Requires the `endpoint` field to be set too.
56
- * - `context`:
57
- * Sets context variables based on the tool arguments, e.g. to change the session language. Only
58
- * `language` and `say` context vars are currently supported, but this will be made more generic.
59
- *
60
- * For example, to change the current session language:
61
- * {
62
- * "type": "context",
63
- * "tool": {
64
- * "function": {
65
- * "name": "set_language",
66
- * "parameters": {
67
- * "language": {
68
- * "type": "string",
69
- * "description": "The ISO 639 language code to set for the session e.g. 'en-US'."
70
- * },
71
- * "message": {
72
- * "type": "string",
73
- * "description": "Inform the caller we're now speaking in the new language."
74
- * }
75
- * }
76
- * }
77
- * }
78
- * }
79
- *
80
- * If `defaults` is provided, it will be used as the default values for the parameters of the
81
- * tool call, if the LLM doesn't provide them:
82
- * "defaults": {
83
- * "hospital": "Queens Hospital"
84
- * }
85
- *
86
- * Some special "transform" handling is supported if the value is a dict with a single `transform`
87
- * key. The parameter value will be transformed by the given `action` before being used as the
88
- * default value:
89
- *
90
- * Removing an unwanted parameter:
91
- * "defaults": {
92
- * "hospital": {
93
- * "transform": {
94
- * "action": "remove"
95
- * }
96
- * }
97
- * }
98
- *
99
- * Using a value from another parameter and converting it to a dictionary:
100
- * "defaults": {
101
- * "tags.hospital": "{vars.hospital}",
102
- * "tags.foo": "{params.foo}",
103
- * "foo": {
104
- * "transform": {
105
- * "action": "remove"
106
- * }
107
- * }
108
- * }
109
- *
110
- * Add custom parameters from other parameters using Python's `format`:
111
- * "defaults": {
112
- * "hello": {
113
- * "transform": {
114
- * "format": "Hello, {name}!"
115
- * }
116
- * }
117
- * }
118
- *
119
- * Modify a value conditionally, e.g. change a `city` parameter with value "Bronx" to "The Bronx":
120
- * {
121
- * "defaults": {
122
- * "city": {
123
- * "transform": {
124
- * "when": {"operator": "eq", "key": "city", "value": "Bronx"},
125
- * "action": "override",
126
- * "format": "The {city}"
127
- * }
128
- * }
129
- * }
130
- * }
131
- *
132
- * Some common transform actions can be abbreviated using the `@` prefix to support a string syntax:
133
- * "defaults": {
134
- * "foo": "@remove",
135
- * "name": "@override Hello, {name}!"
136
- * }
137
48
  */
138
49
  export type ToolDefinition = {
139
50
  /**
@@ -28,95 +28,6 @@ export type ToolResponse = {
28
28
  name: string;
29
29
  /**
30
30
  * A tool that can be called from an LLM during the conversation.
31
- *
32
- * @remarks
33
- *
34
- * The tool can result in one of the following actions depending on the `type` field:
35
- * - `action`:
36
- * A request to perform an action.
37
- * - `endpoint`:
38
- * An HTTP API call to an external tool. Requires the `endpoint` field to be set too.
39
- * - `context`:
40
- * Sets context variables based on the tool arguments, e.g. to change the session language. Only
41
- * `language` and `say` context vars are currently supported, but this will be made more generic.
42
- *
43
- * For example, to change the current session language:
44
- * {
45
- * "type": "context",
46
- * "tool": {
47
- * "function": {
48
- * "name": "set_language",
49
- * "parameters": {
50
- * "language": {
51
- * "type": "string",
52
- * "description": "The ISO 639 language code to set for the session e.g. 'en-US'."
53
- * },
54
- * "message": {
55
- * "type": "string",
56
- * "description": "Inform the caller we're now speaking in the new language."
57
- * }
58
- * }
59
- * }
60
- * }
61
- * }
62
- *
63
- * If `defaults` is provided, it will be used as the default values for the parameters of the
64
- * tool call, if the LLM doesn't provide them:
65
- * "defaults": {
66
- * "hospital": "Queens Hospital"
67
- * }
68
- *
69
- * Some special "transform" handling is supported if the value is a dict with a single `transform`
70
- * key. The parameter value will be transformed by the given `action` before being used as the
71
- * default value:
72
- *
73
- * Removing an unwanted parameter:
74
- * "defaults": {
75
- * "hospital": {
76
- * "transform": {
77
- * "action": "remove"
78
- * }
79
- * }
80
- * }
81
- *
82
- * Using a value from another parameter and converting it to a dictionary:
83
- * "defaults": {
84
- * "tags.hospital": "{vars.hospital}",
85
- * "tags.foo": "{params.foo}",
86
- * "foo": {
87
- * "transform": {
88
- * "action": "remove"
89
- * }
90
- * }
91
- * }
92
- *
93
- * Add custom parameters from other parameters using Python's `format`:
94
- * "defaults": {
95
- * "hello": {
96
- * "transform": {
97
- * "format": "Hello, {name}!"
98
- * }
99
- * }
100
- * }
101
- *
102
- * Modify a value conditionally, e.g. change a `city` parameter with value "Bronx" to "The Bronx":
103
- * {
104
- * "defaults": {
105
- * "city": {
106
- * "transform": {
107
- * "when": {"operator": "eq", "key": "city", "value": "Bronx"},
108
- * "action": "override",
109
- * "format": "The {city}"
110
- * }
111
- * }
112
- * }
113
- * }
114
- *
115
- * Some common transform actions can be abbreviated using the `@` prefix to support a string syntax:
116
- * "defaults": {
117
- * "foo": "@remove",
118
- * "name": "@override Hello, {name}!"
119
- * }
120
31
  */
121
32
  definition: ToolDefinition;
122
33
  /**
@@ -21,95 +21,6 @@ export type ToolUpdateRequest = {
21
21
  name: string;
22
22
  /**
23
23
  * A tool that can be called from an LLM during the conversation.
24
- *
25
- * @remarks
26
- *
27
- * The tool can result in one of the following actions depending on the `type` field:
28
- * - `action`:
29
- * A request to perform an action.
30
- * - `endpoint`:
31
- * An HTTP API call to an external tool. Requires the `endpoint` field to be set too.
32
- * - `context`:
33
- * Sets context variables based on the tool arguments, e.g. to change the session language. Only
34
- * `language` and `say` context vars are currently supported, but this will be made more generic.
35
- *
36
- * For example, to change the current session language:
37
- * {
38
- * "type": "context",
39
- * "tool": {
40
- * "function": {
41
- * "name": "set_language",
42
- * "parameters": {
43
- * "language": {
44
- * "type": "string",
45
- * "description": "The ISO 639 language code to set for the session e.g. 'en-US'."
46
- * },
47
- * "message": {
48
- * "type": "string",
49
- * "description": "Inform the caller we're now speaking in the new language."
50
- * }
51
- * }
52
- * }
53
- * }
54
- * }
55
- *
56
- * If `defaults` is provided, it will be used as the default values for the parameters of the
57
- * tool call, if the LLM doesn't provide them:
58
- * "defaults": {
59
- * "hospital": "Queens Hospital"
60
- * }
61
- *
62
- * Some special "transform" handling is supported if the value is a dict with a single `transform`
63
- * key. The parameter value will be transformed by the given `action` before being used as the
64
- * default value:
65
- *
66
- * Removing an unwanted parameter:
67
- * "defaults": {
68
- * "hospital": {
69
- * "transform": {
70
- * "action": "remove"
71
- * }
72
- * }
73
- * }
74
- *
75
- * Using a value from another parameter and converting it to a dictionary:
76
- * "defaults": {
77
- * "tags.hospital": "{vars.hospital}",
78
- * "tags.foo": "{params.foo}",
79
- * "foo": {
80
- * "transform": {
81
- * "action": "remove"
82
- * }
83
- * }
84
- * }
85
- *
86
- * Add custom parameters from other parameters using Python's `format`:
87
- * "defaults": {
88
- * "hello": {
89
- * "transform": {
90
- * "format": "Hello, {name}!"
91
- * }
92
- * }
93
- * }
94
- *
95
- * Modify a value conditionally, e.g. change a `city` parameter with value "Bronx" to "The Bronx":
96
- * {
97
- * "defaults": {
98
- * "city": {
99
- * "transform": {
100
- * "when": {"operator": "eq", "key": "city", "value": "Bronx"},
101
- * "action": "override",
102
- * "format": "The {city}"
103
- * }
104
- * }
105
- * }
106
- * }
107
- *
108
- * Some common transform actions can be abbreviated using the `@` prefix to support a string syntax:
109
- * "defaults": {
110
- * "foo": "@remove",
111
- * "name": "@override Hello, {name}!"
112
- * }
113
24
  */
114
25
  definition: ToolDefinition;
115
26
  /**