summaryrefslogtreecommitdiff
path: root/webapp/lib/tool-templates.ts
diff options
context:
space:
mode:
authorIlan Bigio <ilan@openai.com>2024-12-16 13:06:08 -0800
committerIlan Bigio <ilan@openai.com>2024-12-19 16:08:22 -0500
commit20009aed53d8864c9204d43a17895168a777d2cc (patch)
tree754dded819869bc34a8a2a02c66ea72dac1ccd24 /webapp/lib/tool-templates.ts
Initial commit
Diffstat (limited to 'webapp/lib/tool-templates.ts')
-rw-r--r--webapp/lib/tool-templates.ts65
1 files changed, 65 insertions, 0 deletions
diff --git a/webapp/lib/tool-templates.ts b/webapp/lib/tool-templates.ts
new file mode 100644
index 0000000..eedbfa9
--- /dev/null
+++ b/webapp/lib/tool-templates.ts
@@ -0,0 +1,65 @@
+export const toolTemplates = [
+ {
+ name: "get_weather",
+ type: "function",
+ description: "Get the current weather",
+ parameters: {
+ type: "object",
+ properties: {
+ location: { type: "string" },
+ },
+ },
+ },
+ {
+ name: "ping_no_args",
+ type: "function",
+ description: "A simple ping tool with no arguments",
+ parameters: {
+ type: "object",
+ properties: {},
+ },
+ },
+ {
+ name: "get_user_nested_args",
+ type: "function",
+ description: "Fetch user profile by nested identifier",
+ parameters: {
+ type: "object",
+ properties: {
+ user: {
+ type: "object",
+ properties: {
+ id: { type: "string" },
+ metadata: {
+ type: "object",
+ properties: {
+ region: { type: "string" },
+ role: { type: "string" },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ {
+ name: "calculate_route_more_properties",
+ type: "function",
+ description: "Calculate travel route with multiple parameters",
+ parameters: {
+ type: "object",
+ properties: {
+ start: { type: "string" },
+ end: { type: "string" },
+ mode: { type: "string", enum: ["car", "bike", "walk"] },
+ options: {
+ type: "object",
+ properties: {
+ avoid_highways: { type: "boolean" },
+ scenic_route: { type: "boolean" },
+ },
+ },
+ },
+ },
+ },
+];