Files
mimiclaw/main/tools/tool_web_search.h
crispyberry 2fe81b8ee1 feat: add non-streaming LLM API, tool registry, and web_search tool
Replace SSE streaming with non-streaming JSON for Anthropic API.
Add llm_chat_tools() returning structured llm_response_t with text
and tool_use blocks. Implement tool registry with dispatch-by-name
and web_search tool via Brave Search API (direct + proxy support).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 00:37:36 +08:00

25 lines
586 B
C

#pragma once
#include "esp_err.h"
#include <stddef.h>
/**
* Initialize web search tool — loads API key from NVS.
*/
esp_err_t tool_web_search_init(void);
/**
* Execute a web search.
*
* @param input_json JSON string with "query" field
* @param output Output buffer for formatted search results
* @param output_size Size of output buffer
* @return ESP_OK on success
*/
esp_err_t tool_web_search_execute(const char *input_json, char *output, size_t output_size);
/**
* Save Brave Search API key to NVS.
*/
esp_err_t tool_web_search_set_key(const char *api_key);