GifproGifpro

Claude Tool Use 双函数调用演示|AI 生成示例提示词

代码预览

エディタを読み込み中…
P

提示词

Create a single HTML file that demonstrates Claude's Tool Use (function calling) with two mock tools. The page should have a chat-like interface where the user can type natural language commands that trigger one of two functions: getWeather(city) or searchFlights(from, to, date). The frontend simulates the API call and displays the result in a structured card. Use a modern dark theme with gradient accents. Include a small log panel showing which function was called with its arguments. Keep it self-contained, no external dependencies beyond Swiper/GSAP/AOS if needed (not needed here).

ClaudeのTool Use(関数呼び出し)を体験できるインタラクティブデモ。2つのモック関数「getWeather(都市)」と「searchFlights(出発地, 目的地, 日付)」を用意。自然言語で「東京の天気は?」や「明日の大阪→札幌便を探して」と入力すると、意図を解析して適切な関数を呼び出し、結果をカード形式で表示。左側のログパネルには呼び出された関数名と引数が記録されるので、関数呼び出しの仕組みを学ぶのに最適です。

提示词解读

体验Claude Tool Use(函数调用)的交互式演示。内置两个模拟函数:「getWeather(城市)」和「searchFlights(出发地, 目的地, 日期)」。用自然语言输入「东京的天气怎么样?」或「查一下明天大阪到札幌的航班」,系统会解析意图并调用相应函数,结果以卡片形式展示。左侧日志面板会记录被调用的函数名和参数,非常适合学习函数调用的工作原理。

这个提示对您有帮助吗?

评论

评论将在审核后显示

この記事が役に立ったら投げ銭で応援

Apple Pay / Google Pay / カード (Visa/Mastercard/JCB/Amex) / Link / Alipay / WeChat Pay 対応 · Stripeで安全に決済

開発者が選ぶ最強ツール集

運営者が毎日使っているツール・ガジェット 6選

見る
首页ヘルプ