syllable-sdk 0.1.0-alpha.41 → 0.1.0-alpha.43
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/docs/sdks/tools/README.md +24 -0
- package/funcs/agentsAgentGetAvailableVoices.d.ts.map +1 -1
- package/funcs/agentsAgentGetAvailableVoices.js +1 -0
- package/funcs/agentsAgentGetAvailableVoices.js.map +1 -1
- package/funcs/agentsCreate.d.ts.map +1 -1
- package/funcs/agentsCreate.js +1 -0
- package/funcs/agentsCreate.js.map +1 -1
- package/funcs/agentsDelete.d.ts.map +1 -1
- package/funcs/agentsDelete.js +1 -0
- package/funcs/agentsDelete.js.map +1 -1
- package/funcs/agentsGetById.d.ts.map +1 -1
- package/funcs/agentsGetById.js +1 -0
- package/funcs/agentsGetById.js.map +1 -1
- package/funcs/agentsList.d.ts.map +1 -1
- package/funcs/agentsList.js +1 -0
- package/funcs/agentsList.js.map +1 -1
- package/funcs/agentsTestSendTestMessage.d.ts.map +1 -1
- package/funcs/agentsTestSendTestMessage.js +1 -0
- package/funcs/agentsTestSendTestMessage.js.map +1 -1
- package/funcs/agentsUpdate.d.ts.map +1 -1
- package/funcs/agentsUpdate.js +1 -0
- package/funcs/agentsUpdate.js.map +1 -1
- package/funcs/channelsDelete.d.ts.map +1 -1
- package/funcs/channelsDelete.js +1 -0
- package/funcs/channelsDelete.js.map +1 -1
- package/funcs/channelsList.d.ts.map +1 -1
- package/funcs/channelsList.js +1 -0
- package/funcs/channelsList.js.map +1 -1
- package/funcs/channelsTargetsAvailableTargets.d.ts.map +1 -1
- package/funcs/channelsTargetsAvailableTargets.js +1 -0
- package/funcs/channelsTargetsAvailableTargets.js.map +1 -1
- package/funcs/channelsTargetsCreate.d.ts.map +1 -1
- package/funcs/channelsTargetsCreate.js +1 -0
- package/funcs/channelsTargetsCreate.js.map +1 -1
- package/funcs/channelsTargetsGetById.d.ts.map +1 -1
- package/funcs/channelsTargetsGetById.js +1 -0
- package/funcs/channelsTargetsGetById.js.map +1 -1
- package/funcs/channelsTargetsList.d.ts.map +1 -1
- package/funcs/channelsTargetsList.js +1 -0
- package/funcs/channelsTargetsList.js.map +1 -1
- package/funcs/channelsTargetsUpdate.d.ts.map +1 -1
- package/funcs/channelsTargetsUpdate.js +1 -0
- package/funcs/channelsTargetsUpdate.js.map +1 -1
- package/funcs/conversationsList.d.ts.map +1 -1
- package/funcs/conversationsList.js +1 -0
- package/funcs/conversationsList.js.map +1 -1
- package/funcs/customMessagesCreate.d.ts.map +1 -1
- package/funcs/customMessagesCreate.js +1 -0
- package/funcs/customMessagesCreate.js.map +1 -1
- package/funcs/customMessagesDelete.d.ts.map +1 -1
- package/funcs/customMessagesDelete.js +1 -0
- package/funcs/customMessagesDelete.js.map +1 -1
- package/funcs/customMessagesGetById.d.ts.map +1 -1
- package/funcs/customMessagesGetById.js +1 -0
- package/funcs/customMessagesGetById.js.map +1 -1
- package/funcs/customMessagesList.d.ts.map +1 -1
- package/funcs/customMessagesList.js +1 -0
- package/funcs/customMessagesList.js.map +1 -1
- package/funcs/customMessagesUpdate.d.ts.map +1 -1
- package/funcs/customMessagesUpdate.js +1 -0
- package/funcs/customMessagesUpdate.js.map +1 -1
- package/funcs/dashboardsPostGetDashboard.d.ts.map +1 -1
- package/funcs/dashboardsPostGetDashboard.js +1 -0
- package/funcs/dashboardsPostGetDashboard.js.map +1 -1
- package/funcs/dashboardsPostListDashboard.d.ts.map +1 -1
- package/funcs/dashboardsPostListDashboard.js +1 -0
- package/funcs/dashboardsPostListDashboard.js.map +1 -1
- package/funcs/dashboardsPostSessionEventsDashboard.d.ts.map +1 -1
- package/funcs/dashboardsPostSessionEventsDashboard.js +1 -0
- package/funcs/dashboardsPostSessionEventsDashboard.js.map +1 -1
- package/funcs/dashboardsPostSessionSummaryDashboard.d.ts.map +1 -1
- package/funcs/dashboardsPostSessionSummaryDashboard.js +1 -0
- package/funcs/dashboardsPostSessionSummaryDashboard.js.map +1 -1
- package/funcs/dashboardsPostSessionTransfersDashboard.d.ts.map +1 -1
- package/funcs/dashboardsPostSessionTransfersDashboard.js +1 -0
- package/funcs/dashboardsPostSessionTransfersDashboard.js.map +1 -1
- package/funcs/dashboardsPostSessionsDashboard.d.ts.map +1 -1
- package/funcs/dashboardsPostSessionsDashboard.js +1 -0
- package/funcs/dashboardsPostSessionsDashboard.js.map +1 -1
- package/funcs/dataSourcesCreate.d.ts.map +1 -1
- package/funcs/dataSourcesCreate.js +1 -0
- package/funcs/dataSourcesCreate.js.map +1 -1
- package/funcs/dataSourcesDelete.d.ts.map +1 -1
- package/funcs/dataSourcesDelete.js +1 -0
- package/funcs/dataSourcesDelete.js.map +1 -1
- package/funcs/dataSourcesGetByName.d.ts.map +1 -1
- package/funcs/dataSourcesGetByName.js +1 -0
- package/funcs/dataSourcesGetByName.js.map +1 -1
- package/funcs/dataSourcesList.d.ts.map +1 -1
- package/funcs/dataSourcesList.js +1 -0
- package/funcs/dataSourcesList.js.map +1 -1
- package/funcs/dataSourcesUpdate.d.ts.map +1 -1
- package/funcs/dataSourcesUpdate.js +1 -0
- package/funcs/dataSourcesUpdate.js.map +1 -1
- package/funcs/eventsList.d.ts.map +1 -1
- package/funcs/eventsList.js +1 -0
- package/funcs/eventsList.js.map +1 -1
- package/funcs/promptsCreate.d.ts.map +1 -1
- package/funcs/promptsCreate.js +1 -0
- package/funcs/promptsCreate.js.map +1 -1
- package/funcs/promptsDelete.d.ts.map +1 -1
- package/funcs/promptsDelete.js +1 -0
- package/funcs/promptsDelete.js.map +1 -1
- package/funcs/promptsGetById.d.ts.map +1 -1
- package/funcs/promptsGetById.js +1 -0
- package/funcs/promptsGetById.js.map +1 -1
- package/funcs/promptsList.d.ts.map +1 -1
- package/funcs/promptsList.js +1 -0
- package/funcs/promptsList.js.map +1 -1
- package/funcs/promptsPromptsHistory.d.ts.map +1 -1
- package/funcs/promptsPromptsHistory.js +1 -0
- package/funcs/promptsPromptsHistory.js.map +1 -1
- package/funcs/promptsUpdate.d.ts.map +1 -1
- package/funcs/promptsUpdate.js +1 -0
- package/funcs/promptsUpdate.js.map +1 -1
- package/funcs/servicesCreate.d.ts.map +1 -1
- package/funcs/servicesCreate.js +1 -0
- package/funcs/servicesCreate.js.map +1 -1
- package/funcs/servicesDelete.d.ts.map +1 -1
- package/funcs/servicesDelete.js +1 -0
- package/funcs/servicesDelete.js.map +1 -1
- package/funcs/servicesGetById.d.ts.map +1 -1
- package/funcs/servicesGetById.js +1 -0
- package/funcs/servicesGetById.js.map +1 -1
- package/funcs/servicesList.d.ts.map +1 -1
- package/funcs/servicesList.js +1 -0
- package/funcs/servicesList.js.map +1 -1
- package/funcs/servicesUpdate.d.ts.map +1 -1
- package/funcs/servicesUpdate.js +1 -0
- package/funcs/servicesUpdate.js.map +1 -1
- package/funcs/sessionLabelsCreate.d.ts.map +1 -1
- package/funcs/sessionLabelsCreate.js +1 -0
- package/funcs/sessionLabelsCreate.js.map +1 -1
- package/funcs/sessionLabelsGetById.d.ts.map +1 -1
- package/funcs/sessionLabelsGetById.js +1 -0
- package/funcs/sessionLabelsGetById.js.map +1 -1
- package/funcs/sessionLabelsList.d.ts.map +1 -1
- package/funcs/sessionLabelsList.js +1 -0
- package/funcs/sessionLabelsList.js.map +1 -1
- package/funcs/sessionsGenerateSessionRecordingUrls.d.ts.map +1 -1
- package/funcs/sessionsGenerateSessionRecordingUrls.js +1 -0
- package/funcs/sessionsGenerateSessionRecordingUrls.js.map +1 -1
- package/funcs/sessionsGetById.d.ts.map +1 -1
- package/funcs/sessionsGetById.js +1 -0
- package/funcs/sessionsGetById.js.map +1 -1
- package/funcs/sessionsList.d.ts.map +1 -1
- package/funcs/sessionsList.js +1 -0
- package/funcs/sessionsList.js.map +1 -1
- package/funcs/sessionsSessionRecordingStream.d.ts.map +1 -1
- package/funcs/sessionsSessionRecordingStream.js +1 -0
- package/funcs/sessionsSessionRecordingStream.js.map +1 -1
- package/funcs/sessionsTranscriptGetById.d.ts.map +1 -1
- package/funcs/sessionsTranscriptGetById.js +1 -0
- package/funcs/sessionsTranscriptGetById.js.map +1 -1
- package/funcs/toolsCreate.d.ts.map +1 -1
- package/funcs/toolsCreate.js +1 -0
- package/funcs/toolsCreate.js.map +1 -1
- package/funcs/toolsDelete.d.ts.map +1 -1
- package/funcs/toolsDelete.js +1 -0
- package/funcs/toolsDelete.js.map +1 -1
- package/funcs/toolsGetByName.d.ts.map +1 -1
- package/funcs/toolsGetByName.js +1 -0
- package/funcs/toolsGetByName.js.map +1 -1
- package/funcs/toolsList.d.ts.map +1 -1
- package/funcs/toolsList.js +1 -0
- package/funcs/toolsList.js.map +1 -1
- package/funcs/toolsUpdate.d.ts.map +1 -1
- package/funcs/toolsUpdate.js +1 -0
- package/funcs/toolsUpdate.js.map +1 -1
- package/funcs/v1PostGetDashboard.d.ts.map +1 -1
- package/funcs/v1PostGetDashboard.js +1 -0
- package/funcs/v1PostGetDashboard.js.map +1 -1
- package/funcs/v1PostListDashboard.d.ts.map +1 -1
- package/funcs/v1PostListDashboard.js +1 -0
- package/funcs/v1PostListDashboard.js.map +1 -1
- package/funcs/v1PostSessionEventsDashboard.d.ts.map +1 -1
- package/funcs/v1PostSessionEventsDashboard.js +1 -0
- package/funcs/v1PostSessionEventsDashboard.js.map +1 -1
- package/funcs/v1PostSessionSummaryDashboard.d.ts.map +1 -1
- package/funcs/v1PostSessionSummaryDashboard.js +1 -0
- package/funcs/v1PostSessionSummaryDashboard.js.map +1 -1
- package/funcs/v1PostSessionTransfersDashboard.d.ts.map +1 -1
- package/funcs/v1PostSessionTransfersDashboard.js +1 -0
- package/funcs/v1PostSessionTransfersDashboard.js.map +1 -1
- package/funcs/v1PostSessionsDashboard.d.ts.map +1 -1
- package/funcs/v1PostSessionsDashboard.js +1 -0
- package/funcs/v1PostSessionsDashboard.js.map +1 -1
- package/hooks/types.d.ts +1 -0
- package/hooks/types.d.ts.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/security.d.ts.map +1 -1
- package/lib/security.js.map +1 -1
- package/mintlify/mint.json +4 -4
- package/models/components/agentcreate.d.ts +1 -1
- package/models/components/agentresponse.d.ts +7 -1
- package/models/components/agentresponse.d.ts.map +1 -1
- package/models/components/agentresponse.js +3 -0
- package/models/components/agentresponse.js.map +1 -1
- package/models/components/agentupdate.d.ts +1 -1
- package/models/components/index.d.ts +2 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +2 -0
- package/models/components/index.js.map +1 -1
- package/models/components/statictoolparameter.d.ts +56 -0
- package/models/components/statictoolparameter.d.ts.map +1 -0
- package/models/components/statictoolparameter.js +68 -0
- package/models/components/statictoolparameter.js.map +1 -0
- package/models/components/statictoolparametertype.d.ts +40 -0
- package/models/components/statictoolparametertype.d.ts.map +1 -0
- package/models/components/statictoolparametertype.js +55 -0
- package/models/components/statictoolparametertype.js.map +1 -0
- package/models/components/toolcreaterequest.d.ts +1 -1
- package/models/components/tooldefinition.d.ts +7 -1
- package/models/components/tooldefinition.d.ts.map +1 -1
- package/models/components/tooldefinition.js +14 -0
- package/models/components/tooldefinition.js.map +1 -1
- package/models/components/tooldetailresponse.d.ts +1 -1
- package/models/components/toolresponse.d.ts +1 -1
- package/models/components/toolupdaterequest.d.ts +1 -1
- package/openapi.json +93 -4
- package/package.json +1 -1
- package/src/funcs/agentsAgentGetAvailableVoices.ts +1 -0
- package/src/funcs/agentsCreate.ts +1 -0
- package/src/funcs/agentsDelete.ts +1 -0
- package/src/funcs/agentsGetById.ts +1 -0
- package/src/funcs/agentsList.ts +1 -0
- package/src/funcs/agentsTestSendTestMessage.ts +1 -0
- package/src/funcs/agentsUpdate.ts +1 -0
- package/src/funcs/channelsDelete.ts +1 -0
- package/src/funcs/channelsList.ts +1 -0
- package/src/funcs/channelsTargetsAvailableTargets.ts +1 -0
- package/src/funcs/channelsTargetsCreate.ts +1 -0
- package/src/funcs/channelsTargetsGetById.ts +1 -0
- package/src/funcs/channelsTargetsList.ts +1 -0
- package/src/funcs/channelsTargetsUpdate.ts +1 -0
- package/src/funcs/conversationsList.ts +1 -0
- package/src/funcs/customMessagesCreate.ts +1 -0
- package/src/funcs/customMessagesDelete.ts +1 -0
- package/src/funcs/customMessagesGetById.ts +1 -0
- package/src/funcs/customMessagesList.ts +1 -0
- package/src/funcs/customMessagesUpdate.ts +1 -0
- package/src/funcs/dashboardsPostGetDashboard.ts +1 -0
- package/src/funcs/dashboardsPostListDashboard.ts +1 -0
- package/src/funcs/dashboardsPostSessionEventsDashboard.ts +1 -0
- package/src/funcs/dashboardsPostSessionSummaryDashboard.ts +1 -0
- package/src/funcs/dashboardsPostSessionTransfersDashboard.ts +1 -0
- package/src/funcs/dashboardsPostSessionsDashboard.ts +1 -0
- package/src/funcs/dataSourcesCreate.ts +1 -0
- package/src/funcs/dataSourcesDelete.ts +1 -0
- package/src/funcs/dataSourcesGetByName.ts +1 -0
- package/src/funcs/dataSourcesList.ts +1 -0
- package/src/funcs/dataSourcesUpdate.ts +1 -0
- package/src/funcs/eventsList.ts +1 -0
- package/src/funcs/promptsCreate.ts +1 -0
- package/src/funcs/promptsDelete.ts +1 -0
- package/src/funcs/promptsGetById.ts +1 -0
- package/src/funcs/promptsList.ts +1 -0
- package/src/funcs/promptsPromptsHistory.ts +1 -0
- package/src/funcs/promptsUpdate.ts +1 -0
- package/src/funcs/servicesCreate.ts +1 -0
- package/src/funcs/servicesDelete.ts +1 -0
- package/src/funcs/servicesGetById.ts +1 -0
- package/src/funcs/servicesList.ts +1 -0
- package/src/funcs/servicesUpdate.ts +1 -0
- package/src/funcs/sessionLabelsCreate.ts +1 -0
- package/src/funcs/sessionLabelsGetById.ts +1 -0
- package/src/funcs/sessionLabelsList.ts +1 -0
- package/src/funcs/sessionsGenerateSessionRecordingUrls.ts +1 -0
- package/src/funcs/sessionsGetById.ts +1 -0
- package/src/funcs/sessionsList.ts +1 -0
- package/src/funcs/sessionsSessionRecordingStream.ts +1 -0
- package/src/funcs/sessionsTranscriptGetById.ts +1 -0
- package/src/funcs/toolsCreate.ts +1 -0
- package/src/funcs/toolsDelete.ts +1 -0
- package/src/funcs/toolsGetByName.ts +1 -0
- package/src/funcs/toolsList.ts +1 -0
- package/src/funcs/toolsUpdate.ts +1 -0
- package/src/funcs/v1PostGetDashboard.ts +1 -0
- package/src/funcs/v1PostListDashboard.ts +1 -0
- package/src/funcs/v1PostSessionEventsDashboard.ts +1 -0
- package/src/funcs/v1PostSessionSummaryDashboard.ts +1 -0
- package/src/funcs/v1PostSessionTransfersDashboard.ts +1 -0
- package/src/funcs/v1PostSessionsDashboard.ts +1 -0
- package/src/hooks/types.ts +1 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/security.ts +0 -1
- package/src/models/components/agentcreate.ts +1 -1
- package/src/models/components/agentresponse.ts +14 -1
- package/src/models/components/agentupdate.ts +1 -1
- package/src/models/components/index.ts +2 -0
- package/src/models/components/statictoolparameter.ts +105 -0
- package/src/models/components/statictoolparametertype.ts +43 -0
- package/src/models/components/toolcreaterequest.ts +1 -1
- package/src/models/components/tooldefinition.ts +25 -1
- package/src/models/components/tooldetailresponse.ts +1 -1
- package/src/models/components/toolresponse.ts +1 -1
- package/src/models/components/toolupdaterequest.ts +1 -1
package/src/funcs/toolsList.ts
CHANGED
package/src/funcs/toolsUpdate.ts
CHANGED
package/src/hooks/types.ts
CHANGED
package/src/lib/config.ts
CHANGED
|
@@ -57,8 +57,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
57
57
|
export const SDK_METADATA = {
|
|
58
58
|
language: "typescript",
|
|
59
59
|
openapiDocVersion: "0.0.2",
|
|
60
|
-
sdkVersion: "0.1.0-alpha.
|
|
61
|
-
genVersion: "2.
|
|
60
|
+
sdkVersion: "0.1.0-alpha.43",
|
|
61
|
+
genVersion: "2.512.4",
|
|
62
62
|
userAgent:
|
|
63
|
-
"speakeasy-sdk/typescript 0.1.0-alpha.
|
|
63
|
+
"speakeasy-sdk/typescript 0.1.0-alpha.43 2.512.4 0.0.2 syllable-sdk",
|
|
64
64
|
} as const;
|
package/src/lib/security.ts
CHANGED
|
@@ -31,6 +31,12 @@ import {
|
|
|
31
31
|
PromptResponse$Outbound,
|
|
32
32
|
PromptResponse$outboundSchema,
|
|
33
33
|
} from "./promptresponse.js";
|
|
34
|
+
import {
|
|
35
|
+
ToolResponse,
|
|
36
|
+
ToolResponse$inboundSchema,
|
|
37
|
+
ToolResponse$Outbound,
|
|
38
|
+
ToolResponse$outboundSchema,
|
|
39
|
+
} from "./toolresponse.js";
|
|
34
40
|
|
|
35
41
|
/**
|
|
36
42
|
* When a user interacts with the Syllable system, they do so by communicating with an agent.
|
|
@@ -69,7 +75,7 @@ export type AgentResponse = {
|
|
|
69
75
|
*/
|
|
70
76
|
timezone: string;
|
|
71
77
|
/**
|
|
72
|
-
*
|
|
78
|
+
* User-configured parameter values for the agent's tools
|
|
73
79
|
*/
|
|
74
80
|
promptToolDefaults?: Array<AgentToolDefaults> | undefined;
|
|
75
81
|
/**
|
|
@@ -112,6 +118,10 @@ export type AgentResponse = {
|
|
|
112
118
|
* Channel targets associated with the agent
|
|
113
119
|
*/
|
|
114
120
|
channelTargets?: Array<ChannelTargetResponse> | null | undefined;
|
|
121
|
+
/**
|
|
122
|
+
* Tools associated with the agent
|
|
123
|
+
*/
|
|
124
|
+
tools?: Array<ToolResponse> | null | undefined;
|
|
115
125
|
};
|
|
116
126
|
|
|
117
127
|
/** @internal */
|
|
@@ -140,6 +150,7 @@ export const AgentResponse$inboundSchema: z.ZodType<
|
|
|
140
150
|
channel_targets: z.nullable(
|
|
141
151
|
z.array(z.lazy(() => ChannelTargetResponse$inboundSchema)),
|
|
142
152
|
).optional(),
|
|
153
|
+
tools: z.nullable(z.array(ToolResponse$inboundSchema)).optional(),
|
|
143
154
|
}).transform((v) => {
|
|
144
155
|
return remap$(v, {
|
|
145
156
|
"prompt_id": "promptId",
|
|
@@ -174,6 +185,7 @@ export type AgentResponse$Outbound = {
|
|
|
174
185
|
prompt?: PromptResponse$Outbound | null | undefined;
|
|
175
186
|
custom_message?: CustomMessageResponse$Outbound | null | undefined;
|
|
176
187
|
channel_targets?: Array<ChannelTargetResponse$Outbound> | null | undefined;
|
|
188
|
+
tools?: Array<ToolResponse$Outbound> | null | undefined;
|
|
177
189
|
};
|
|
178
190
|
|
|
179
191
|
/** @internal */
|
|
@@ -202,6 +214,7 @@ export const AgentResponse$outboundSchema: z.ZodType<
|
|
|
202
214
|
channelTargets: z.nullable(
|
|
203
215
|
z.array(z.lazy(() => ChannelTargetResponse$outboundSchema)),
|
|
204
216
|
).optional(),
|
|
217
|
+
tools: z.nullable(z.array(ToolResponse$outboundSchema)).optional(),
|
|
205
218
|
}).transform((v) => {
|
|
206
219
|
return remap$(v, {
|
|
207
220
|
promptId: "prompt_id",
|
|
@@ -75,6 +75,8 @@ export * from "./sessionproperties.js";
|
|
|
75
75
|
export * from "./sessionrecordingresponse.js";
|
|
76
76
|
export * from "./sessiontext.js";
|
|
77
77
|
export * from "./sessiontranscriptionresponse.js";
|
|
78
|
+
export * from "./statictoolparameter.js";
|
|
79
|
+
export * from "./statictoolparametertype.js";
|
|
78
80
|
export * from "./sttprovider.js";
|
|
79
81
|
export * from "./targetmodes.js";
|
|
80
82
|
export * from "./testmessage.js";
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
StaticToolParameterType,
|
|
11
|
+
StaticToolParameterType$inboundSchema,
|
|
12
|
+
StaticToolParameterType$outboundSchema,
|
|
13
|
+
} from "./statictoolparametertype.js";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* A parameter for the tool whose value should be set at config time.
|
|
17
|
+
*/
|
|
18
|
+
export type StaticToolParameter = {
|
|
19
|
+
/**
|
|
20
|
+
* The name of the parameter - must be unique within the tool.
|
|
21
|
+
*/
|
|
22
|
+
name: string;
|
|
23
|
+
/**
|
|
24
|
+
* The description of the parameter.
|
|
25
|
+
*/
|
|
26
|
+
description?: string | null | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the parameter is required to have a value assigned.
|
|
29
|
+
*/
|
|
30
|
+
required: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* The expected type for a static tool parameter.
|
|
33
|
+
*/
|
|
34
|
+
type: StaticToolParameterType;
|
|
35
|
+
/**
|
|
36
|
+
* The default value for the parameter. If `type` is string, must be a string. If `type` is int, must be an int. If `type` is boolean, must be a boolean. If `type` is data_source_list, must be a list of strings (data source names).
|
|
37
|
+
*/
|
|
38
|
+
default?: any | null | undefined;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const StaticToolParameter$inboundSchema: z.ZodType<
|
|
43
|
+
StaticToolParameter,
|
|
44
|
+
z.ZodTypeDef,
|
|
45
|
+
unknown
|
|
46
|
+
> = z.object({
|
|
47
|
+
name: z.string(),
|
|
48
|
+
description: z.nullable(z.string()).optional(),
|
|
49
|
+
required: z.boolean(),
|
|
50
|
+
type: StaticToolParameterType$inboundSchema,
|
|
51
|
+
default: z.nullable(z.any()).optional(),
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export type StaticToolParameter$Outbound = {
|
|
56
|
+
name: string;
|
|
57
|
+
description?: string | null | undefined;
|
|
58
|
+
required: boolean;
|
|
59
|
+
type: string;
|
|
60
|
+
default?: any | null | undefined;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export const StaticToolParameter$outboundSchema: z.ZodType<
|
|
65
|
+
StaticToolParameter$Outbound,
|
|
66
|
+
z.ZodTypeDef,
|
|
67
|
+
StaticToolParameter
|
|
68
|
+
> = z.object({
|
|
69
|
+
name: z.string(),
|
|
70
|
+
description: z.nullable(z.string()).optional(),
|
|
71
|
+
required: z.boolean(),
|
|
72
|
+
type: StaticToolParameterType$outboundSchema,
|
|
73
|
+
default: z.nullable(z.any()).optional(),
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @internal
|
|
78
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
79
|
+
*/
|
|
80
|
+
export namespace StaticToolParameter$ {
|
|
81
|
+
/** @deprecated use `StaticToolParameter$inboundSchema` instead. */
|
|
82
|
+
export const inboundSchema = StaticToolParameter$inboundSchema;
|
|
83
|
+
/** @deprecated use `StaticToolParameter$outboundSchema` instead. */
|
|
84
|
+
export const outboundSchema = StaticToolParameter$outboundSchema;
|
|
85
|
+
/** @deprecated use `StaticToolParameter$Outbound` instead. */
|
|
86
|
+
export type Outbound = StaticToolParameter$Outbound;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function staticToolParameterToJSON(
|
|
90
|
+
staticToolParameter: StaticToolParameter,
|
|
91
|
+
): string {
|
|
92
|
+
return JSON.stringify(
|
|
93
|
+
StaticToolParameter$outboundSchema.parse(staticToolParameter),
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function staticToolParameterFromJSON(
|
|
98
|
+
jsonString: string,
|
|
99
|
+
): SafeParseResult<StaticToolParameter, SDKValidationError> {
|
|
100
|
+
return safeParse(
|
|
101
|
+
jsonString,
|
|
102
|
+
(x) => StaticToolParameter$inboundSchema.parse(JSON.parse(x)),
|
|
103
|
+
`Failed to parse 'StaticToolParameter' from JSON`,
|
|
104
|
+
);
|
|
105
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The expected type for a static tool parameter.
|
|
10
|
+
*/
|
|
11
|
+
export const StaticToolParameterType = {
|
|
12
|
+
String: "string",
|
|
13
|
+
Int: "int",
|
|
14
|
+
Boolean: "boolean",
|
|
15
|
+
DataSourceList: "data_source_list",
|
|
16
|
+
} as const;
|
|
17
|
+
/**
|
|
18
|
+
* The expected type for a static tool parameter.
|
|
19
|
+
*/
|
|
20
|
+
export type StaticToolParameterType = ClosedEnum<
|
|
21
|
+
typeof StaticToolParameterType
|
|
22
|
+
>;
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const StaticToolParameterType$inboundSchema: z.ZodNativeEnum<
|
|
26
|
+
typeof StaticToolParameterType
|
|
27
|
+
> = z.nativeEnum(StaticToolParameterType);
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const StaticToolParameterType$outboundSchema: z.ZodNativeEnum<
|
|
31
|
+
typeof StaticToolParameterType
|
|
32
|
+
> = StaticToolParameterType$inboundSchema;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @internal
|
|
36
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
37
|
+
*/
|
|
38
|
+
export namespace StaticToolParameterType$ {
|
|
39
|
+
/** @deprecated use `StaticToolParameterType$inboundSchema` instead. */
|
|
40
|
+
export const inboundSchema = StaticToolParameterType$inboundSchema;
|
|
41
|
+
/** @deprecated use `StaticToolParameterType$outboundSchema` instead. */
|
|
42
|
+
export const outboundSchema = StaticToolParameterType$outboundSchema;
|
|
43
|
+
}
|
|
@@ -20,7 +20,7 @@ export type ToolCreateRequest = {
|
|
|
20
20
|
*/
|
|
21
21
|
name: string;
|
|
22
22
|
/**
|
|
23
|
-
* A tool that can be called from an LLM during the conversation.
|
|
23
|
+
* A tool that can be called from an LLM during the conversation. See https://docs.syllable.ai/Resources/Tools.
|
|
24
24
|
*/
|
|
25
25
|
definition: ToolDefinition;
|
|
26
26
|
/**
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
8
|
import { ClosedEnum } from "../../types/enums.js";
|
|
8
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
@@ -13,6 +14,12 @@ import {
|
|
|
13
14
|
InternalTool$Outbound,
|
|
14
15
|
InternalTool$outboundSchema,
|
|
15
16
|
} from "./internaltool.js";
|
|
17
|
+
import {
|
|
18
|
+
StaticToolParameter,
|
|
19
|
+
StaticToolParameter$inboundSchema,
|
|
20
|
+
StaticToolParameter$Outbound,
|
|
21
|
+
StaticToolParameter$outboundSchema,
|
|
22
|
+
} from "./statictoolparameter.js";
|
|
16
23
|
import {
|
|
17
24
|
ToolHttpEndpoint,
|
|
18
25
|
ToolHttpEndpoint$inboundSchema,
|
|
@@ -40,7 +47,7 @@ export type Type = ClosedEnum<typeof Type>;
|
|
|
40
47
|
export type Defaults = any | { [k: string]: ToolParameterDefault };
|
|
41
48
|
|
|
42
49
|
/**
|
|
43
|
-
* A tool that can be called from an LLM during the conversation.
|
|
50
|
+
* A tool that can be called from an LLM during the conversation. See https://docs.syllable.ai/Resources/Tools.
|
|
44
51
|
*/
|
|
45
52
|
export type ToolDefinition = {
|
|
46
53
|
/**
|
|
@@ -59,6 +66,10 @@ export type ToolDefinition = {
|
|
|
59
66
|
* The default values for the parameters of the function/tool call.
|
|
60
67
|
*/
|
|
61
68
|
defaults?: any | { [k: string]: ToolParameterDefault } | null | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* Parameters for the tool whose values should be set at config time (i.e., not provided by the LLM).
|
|
71
|
+
*/
|
|
72
|
+
staticParameters?: Array<StaticToolParameter> | null | undefined;
|
|
62
73
|
/**
|
|
63
74
|
* The optional result of the tool call. Only used for `context` tools.
|
|
64
75
|
*/
|
|
@@ -143,7 +154,13 @@ export const ToolDefinition$inboundSchema: z.ZodType<
|
|
|
143
154
|
defaults: z.nullable(
|
|
144
155
|
z.union([z.any(), z.record(ToolParameterDefault$inboundSchema)]),
|
|
145
156
|
).optional(),
|
|
157
|
+
static_parameters: z.nullable(z.array(StaticToolParameter$inboundSchema))
|
|
158
|
+
.optional(),
|
|
146
159
|
result: z.nullable(z.any()).optional(),
|
|
160
|
+
}).transform((v) => {
|
|
161
|
+
return remap$(v, {
|
|
162
|
+
"static_parameters": "staticParameters",
|
|
163
|
+
});
|
|
147
164
|
});
|
|
148
165
|
|
|
149
166
|
/** @internal */
|
|
@@ -156,6 +173,7 @@ export type ToolDefinition$Outbound = {
|
|
|
156
173
|
| { [k: string]: ToolParameterDefault$Outbound }
|
|
157
174
|
| null
|
|
158
175
|
| undefined;
|
|
176
|
+
static_parameters?: Array<StaticToolParameter$Outbound> | null | undefined;
|
|
159
177
|
result?: any | null | undefined;
|
|
160
178
|
};
|
|
161
179
|
|
|
@@ -171,7 +189,13 @@ export const ToolDefinition$outboundSchema: z.ZodType<
|
|
|
171
189
|
defaults: z.nullable(
|
|
172
190
|
z.union([z.any(), z.record(ToolParameterDefault$outboundSchema)]),
|
|
173
191
|
).optional(),
|
|
192
|
+
staticParameters: z.nullable(z.array(StaticToolParameter$outboundSchema))
|
|
193
|
+
.optional(),
|
|
174
194
|
result: z.nullable(z.any()).optional(),
|
|
195
|
+
}).transform((v) => {
|
|
196
|
+
return remap$(v, {
|
|
197
|
+
staticParameters: "static_parameters",
|
|
198
|
+
});
|
|
175
199
|
});
|
|
176
200
|
|
|
177
201
|
/**
|
|
@@ -27,7 +27,7 @@ export type ToolDetailResponse = {
|
|
|
27
27
|
*/
|
|
28
28
|
name: string;
|
|
29
29
|
/**
|
|
30
|
-
* A tool that can be called from an LLM during the conversation.
|
|
30
|
+
* A tool that can be called from an LLM during the conversation. See https://docs.syllable.ai/Resources/Tools.
|
|
31
31
|
*/
|
|
32
32
|
definition: ToolDefinition;
|
|
33
33
|
/**
|
|
@@ -27,7 +27,7 @@ export type ToolResponse = {
|
|
|
27
27
|
*/
|
|
28
28
|
name: string;
|
|
29
29
|
/**
|
|
30
|
-
* A tool that can be called from an LLM during the conversation.
|
|
30
|
+
* A tool that can be called from an LLM during the conversation. See https://docs.syllable.ai/Resources/Tools.
|
|
31
31
|
*/
|
|
32
32
|
definition: ToolDefinition;
|
|
33
33
|
/**
|
|
@@ -20,7 +20,7 @@ export type ToolUpdateRequest = {
|
|
|
20
20
|
*/
|
|
21
21
|
name: string;
|
|
22
22
|
/**
|
|
23
|
-
* A tool that can be called from an LLM during the conversation.
|
|
23
|
+
* A tool that can be called from an LLM during the conversation. See https://docs.syllable.ai/Resources/Tools.
|
|
24
24
|
*/
|
|
25
25
|
definition: ToolDefinition;
|
|
26
26
|
/**
|