Dingpenghui-good/dsh-web-search-serper0

@dingpenghui/dsh-web-search-serper

Serper.dev-backed web search provider for DSH (DeepSeek Harness) web capability seam

包名
@dingpenghui/dsh-web-search-serper
版本
0.3.0
许可证
MIT
最近更新
2026年9月6日

安装

此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗

Configuration Options

FieldTypeRequiredDefaultDescription
apiKeystringNo$SERPER_API_KEYSerper API key
baseURLstringNohttps://google.serper.devAPI endpoint base
glstringNo-Country code (e.g., us, cn, jp)
crstringNo-Region code (e.g., cr=us)
numResultsnumberNo10Default result count

Usage Examples

Basic Search

import { apply } from '@dingpenghui/dsh-web-search-serper'

// Use in a Cordis plugin
apply(ctx, {
  apiKey: 'your-api-key',
  gl: 'cn',
})

Search via ctx.web

const result = await ctx.web.search({
  query: 'latest AI developments 2026',
  maxResults: 5,
})

console.log(result.sources)
// [
//   { url: '...', title: '...', snippet: '...' },
//   ...
// ]