// 构建返回信息 return String.format("Temperature: %s°%s\nWind: %s %s\nForecast: %s", temperature, temperatureUnit, windSpeed, windDirection, detailedForecast); // Returns detailed forecast including: // - Temperature and unit // - Wind speed and direction // - Detailed forecast description }
@Tool(description = "Get weather alerts for a US state") public String getAlerts(@ToolParam(description = "Two-letter US state code (e.g. CA, NY)") String state) { // 获取指定州的天气警报 StringalertsResponse= restClient.get() .uri("/alerts/active/area/{state}", state) .retrieve() .body(String.class);
// 检查是否有警报 List<Map<String, Object>> features = JsonPath.read(alertsResponse, "$.features"); if (features.isEmpty()) { return"当前没有活动警报。"; }
[llm] model = "deepseek-r1-250120"# The LLM model to use base_url = "https://ark.cn-beijing.volces.com/api/v3"# API endpoint URL api_key = "xxxxxxxxxxxxxxxxxx"# Your API key max_tokens = 8192# Maximum number of tokens in the response temperature = 0.0
python main.py INFO [browser_use] BrowserUse logging setup complete with level info INFO [root] Anonymized telemetry enabled. See https://docs.browser-use.com/development/telemetry for more information. Enter your prompt: 帮我看下明天杭州的天气,并且生成穿衣指南 2025-04-20 20:40:14.721 | WARNING | __main__:main:16 - Processing your request... 2025-04-20 20:40:14.722 | INFO | app.agent.base:run:140 - Executing step 1/20 2025-04-20 20:40:33.488 | INFO | app.llm:update_token_count:250 - Token usage: Input=2165, Completion=658, Cumulative Input=2165, Cumulative Completion=658, Total=2823, Cumulative Total=2823 2025-04-20 20:40:33.489 | INFO | app.agent.toolcall:think:81 - ✨ Manus's thoughts:
2025-04-20 20:40:33.489 | INFO | app.agent.toolcall:think:82 - 🛠️ Manus selected 1 tools to use 2025-04-20 20:40:33.489 | INFO | app.agent.toolcall:think:86 - 🧰 Tools being prepared: ['browser_use'] 2025-04-20 20:40:33.489 | INFO | app.agent.toolcall:think:89 - 🔧 Tool arguments: { "action": "web_search", "query": "杭州明天天气预报" } 2025-04-20 20:40:33.490 | INFO | app.agent.toolcall:execute_tool:180 - 🔧 Activating tool: 'browser_use'... ERROR [browser] Failed to initialize Playwright browser: BrowserType.launch: Executable doesn't exist at /Users/username/Library/Caches/ms-playwright/chromium-1161/chrome-mac/Chromium.app/Contents/MacOS/Chromium ╔════════════════════════════════════════════════════════════╗ ║ Looks like Playwright was just installed or updated. ║ ║ Please run the following command to download new browsers: ║ ║ ║ ║ playwright install ║ ║ ║ ║ <3 Playwright Team ║ ╚════════════════════════════════════════════════════════════╝ 2025-04-20 20:40:34.896 | INFO | app.agent.toolcall:act:150 - 🎯 Tool 'browser_use' completed its mission! Result: Observed output of cmd `browser_use` executed: Error: Browser action 'web_search' failed: BrowserType.launch: Executable doesn't exist at /Users/username/Library/Caches/ms-playwright/chromium-1161/chrome-mac/Chromium.app/Contents/MacOS/Chromium ╔════════════════════════════════════════════════════════════╗ ║ Looks like Playwright was just installed or updated. ║ ║ Please run the following command to download new browsers: ║ ║ ║ ║ playwright install ║ ║ ║ ║ <3 Playwright Team ║ ╚════════════════════════════════════════════════════════════╝ 2025-04-20 20:40:34.896 | INFO | app.agent.base:run:140 - Executing step 2/20 ERROR [browser] Failed to initialize Playwright browser: BrowserType.launch: Executable doesn't exist at /Users/username/Library/Caches/ms-playwright/chromium-1161/chrome-mac/Chromium.app/Contents/MacOS/Chromium ╔════════════════════════════════════════════════════════════╗ ║ Looks like Playwright was just installed or updated. ║ ║ Please run the following command to download new browsers: ║ ║ ║ ║ playwright install ║ ║ ║ ║ <3 Playwright Team ║ ╚════════════════════════════════════════════════════════════╝ WARNING [browser] Page load failed, continuing... ERROR [browser] Failed to initialize Playwright browser: BrowserType.launch: Executable doesn't exist at /Users/username/Library/Caches/ms-playwright/chromium-1161/chrome-mac/Chromium.app/Contents/MacOS/Chromium ╔════════════════════════════════════════════════════════════╗ ║ Looks like Playwright was just installed or updated. ║ ║ Please run the following command to download new browsers: ║ ║ ║ ║ playwright install ║ ║ ║ ║ <3 Playwright Team ║ ╚════════════════════════════════════════════════════════════╝