fix type error in testOutputSchemaServers.ts

This commit is contained in:
Basil Hosmer 2025-05-15 10:16:49 -04:00
commit f470f0996b
No known key found for this signature in database

View file

@ -69,9 +69,9 @@ async function main() {
console.log(JSON.stringify(weatherResult.structuredContent, null, 2));
}
if (weatherResult.content) {
if (weatherResult.content && Array.isArray(weatherResult.content)) {
console.log("Unstructured content:");
weatherResult.content.forEach(content => {
weatherResult.content.forEach((content: any) => {
if (content.type === "text") {
console.log(content.text);
}