mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-13 04:40:44 +08:00
重构主控编排与运行时预热链路,统一工作区提示词/专家调度协议并补齐 wiki 记忆注入与写回闭环。
同时收敛启动与运维脚本默认行为(含 wiki worker)、更新 Admin 可观测性与相关测试,降低首轮时延并提高运行稳定性。 Made-with: Cursor
This commit is contained in:
parent
4a23b715a2
commit
dbbe3add6a
14438 changed files with 2693620 additions and 2546 deletions
98
openclaw/docs/tools/gemini-search.md
Normal file
98
openclaw/docs/tools/gemini-search.md
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
---
|
||||
summary: "Gemini web search with Google Search grounding"
|
||||
read_when:
|
||||
- You want to use Gemini for web_search
|
||||
- You need a GEMINI_API_KEY
|
||||
- You want Google Search grounding
|
||||
title: "Gemini Search"
|
||||
---
|
||||
|
||||
# Gemini Search
|
||||
|
||||
OpenClaw supports Gemini models with built-in
|
||||
[Google Search grounding](https://ai.google.dev/gemini-api/docs/grounding),
|
||||
which returns AI-synthesized answers backed by live Google Search results with
|
||||
citations.
|
||||
|
||||
## Get an API key
|
||||
|
||||
<Steps>
|
||||
<Step title="Create a key">
|
||||
Go to [Google AI Studio](https://aistudio.google.com/apikey) and create an
|
||||
API key.
|
||||
</Step>
|
||||
<Step title="Store the key">
|
||||
Set `GEMINI_API_KEY` in the Gateway environment, or configure via:
|
||||
|
||||
```bash
|
||||
openclaw configure --section web
|
||||
```
|
||||
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## Config
|
||||
|
||||
```json5
|
||||
{
|
||||
plugins: {
|
||||
entries: {
|
||||
google: {
|
||||
config: {
|
||||
webSearch: {
|
||||
apiKey: "AIza...", // optional if GEMINI_API_KEY is set
|
||||
model: "gemini-2.5-flash", // default
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
tools: {
|
||||
web: {
|
||||
search: {
|
||||
provider: "gemini",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
**Environment alternative:** set `GEMINI_API_KEY` in the Gateway environment.
|
||||
For a gateway install, put it in `~/.openclaw/.env`.
|
||||
|
||||
## How it works
|
||||
|
||||
Unlike traditional search providers that return a list of links and snippets,
|
||||
Gemini uses Google Search grounding to produce AI-synthesized answers with
|
||||
inline citations. The results include both the synthesized answer and the source
|
||||
URLs.
|
||||
|
||||
- Citation URLs from Gemini grounding are automatically resolved from Google
|
||||
redirect URLs to direct URLs.
|
||||
- Redirect resolution uses the SSRF guard path (HEAD + redirect checks +
|
||||
http/https validation) before returning the final citation URL.
|
||||
- Redirect resolution uses strict SSRF defaults, so redirects to
|
||||
private/internal targets are blocked.
|
||||
|
||||
## Supported parameters
|
||||
|
||||
Gemini search supports `query`.
|
||||
|
||||
`count` is accepted for shared `web_search` compatibility, but Gemini grounding
|
||||
still returns one synthesized answer with citations rather than an N-result
|
||||
list.
|
||||
|
||||
Provider-specific filters like `country`, `language`, `freshness`, and
|
||||
`domain_filter` are not supported.
|
||||
|
||||
## Model selection
|
||||
|
||||
The default model is `gemini-2.5-flash` (fast and cost-effective). Any Gemini
|
||||
model that supports grounding can be used via
|
||||
`plugins.entries.google.config.webSearch.model`.
|
||||
|
||||
## Related
|
||||
|
||||
- [Web Search overview](/tools/web) -- all providers and auto-detection
|
||||
- [Brave Search](/tools/brave-search) -- structured results with snippets
|
||||
- [Perplexity Search](/tools/perplexity-search) -- structured results + content extraction
|
||||
Loading…
Add table
Add a link
Reference in a new issue