From 286b231ac784b1f8759969058fb6b30ca3326469 Mon Sep 17 00:00:00 2001 From: Danny Banks Date: Fri, 15 Nov 2024 14:50:41 -0800 Subject: [PATCH] updates --- src/pages/[platform]/ai/conversation/history/index.mdx | 6 +++++- src/pages/[platform]/ai/conversation/tools/index.mdx | 10 ++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/pages/[platform]/ai/conversation/history/index.mdx b/src/pages/[platform]/ai/conversation/history/index.mdx index be646723fa2..d35f66bb515 100644 --- a/src/pages/[platform]/ai/conversation/history/index.mdx +++ b/src/pages/[platform]/ai/conversation/history/index.mdx @@ -82,7 +82,11 @@ const { data: conversation } = await client.conversations.chat.get({ id: convers const { data: messages } = await conversation.listMessages(); // You can now send a message to the conversation -conversation.sendMessage({}) +conversation.sendMessage({ + content: [ + {text: "hello"} + ] +}) ``` diff --git a/src/pages/[platform]/ai/conversation/tools/index.mdx b/src/pages/[platform]/ai/conversation/tools/index.mdx index 628d0c521e4..2a67d927288 100644 --- a/src/pages/[platform]/ai/conversation/tools/index.mdx +++ b/src/pages/[platform]/ai/conversation/tools/index.mdx @@ -229,12 +229,10 @@ const thermometer: ExecutableTool = { name: 'thermometer', description: 'Returns current temperature in a city', execute: (input): Promise => { - if (input && typeof input === 'object' && 'city' in input) { - if (input.city === 'Seattle') { - return Promise.resolve({ - text: `75F`, - }); - } + if (input.city === 'Seattle') { + return Promise.resolve({ + text: `75F`, + }); } return Promise.resolve({ text: 'unknown'