Merge pull request #725 from sushichan044/revert-670-feat/structured-content-with-type-safety
Revert "fix: add type safety for tool output schemas in ToolCallback"
This commit is contained in:
commit
9879d7a98e
1 changed files with 27 additions and 54 deletions
|
|
@ -43,14 +43,7 @@ server.registerTool(
|
|||
void country;
|
||||
// Simulate weather API call
|
||||
const temp_c = Math.round((Math.random() * 35 - 5) * 10) / 10;
|
||||
const conditionCandidates = [
|
||||
"sunny",
|
||||
"cloudy",
|
||||
"rainy",
|
||||
"stormy",
|
||||
"snowy",
|
||||
] as const;
|
||||
const conditions = conditionCandidates[Math.floor(Math.random() * conditionCandidates.length)];
|
||||
const conditions = ["sunny", "cloudy", "rainy", "stormy", "snowy"][Math.floor(Math.random() * 5)];
|
||||
|
||||
const structuredContent = {
|
||||
temperature: {
|
||||
|
|
@ -84,4 +77,4 @@ async function main() {
|
|||
main().catch((error) => {
|
||||
console.error("Server error:", error);
|
||||
process.exit(1);
|
||||
});
|
||||
});
|
||||
Loading…
Reference in a new issue