Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions apps/docs/content/docs/de/tools/bocha.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: BoCha
description: Websuche mit BoCha
---

[BoCha](https://bocha.cn/) ist eine KI-gestützte Such-API, die speziell für LLM-Anwendungen entwickelt wurde. Sie bietet zuverlässige Echtzeit-Informationsabfragen und ist für KI-Anwendungsfälle optimiert.

Mit BoCha in Sim können Sie:

- **Webseiten durchsuchen**: Sofort Antworten, Fakten und Übersichten zu Suchanfragen finden
- **Direkte Antworten erhalten**: Konkrete Ergebnisse für Berechnungen, Umrechnungen oder Faktenabfragen abrufen
- **Zusammenfassungen erhalten**: Kurze Zusammenfassungen oder Beschreibungen zu Suchthemen bekommen
- **Verwandte Themen entdecken**: Links und Referenzen zu verwandten Suchthemen finden

Diese Funktionen ermöglichen es Sim-Agenten, automatisch auf aktuelles Webwissen zuzugreifen – von der Darstellung von Fakten in Workflows bis hin zur Anreicherung von Dokumenten und Analysen mit neuesten Informationen.

## Verwendung

Verwenden Sie die BoCha Instant Answer API, um das Web zu durchsuchen. Sie gibt direkte Antworten, Zusammenfassungen und verwandte Themen zurück.

## Tool

### `bocha_search`

Durchsucht das Web mit der BoCha Instant Answer API und gibt direkte Antworten, Zusammenfassungen und verwandte Themen zurück.

#### Eingaben

| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | ---- | ----------- |
| `query` | string | Ja | Die auszuführende Suchanfrage (z. B. „latest AI research papers 2024“) |
| `freshness` | string | Nein | Zeitbereich der Suchergebnisse (noLimit / oneDay / oneWeek / oneMonth / oneYear / YYYY-MM-DD / YYYY-MM-DD..YYYY-MM-DD) |
| `summary` | boolean | Nein | Ob eine Textzusammenfassung zurückgegeben werden soll |
| `count` | number | Nein | Maximale Anzahl der Ergebnisse (1–50, z. B. 5) |
| `include` | string | Nein | Eingeschränkte Domains für die Suche, getrennt durch `|` oder `,` (max. 100) |
| `exclude` | string | Nein | Ausgeschlossene Domains, getrennt durch `|` oder `,` (max. 100) |

#### Ausgaben

| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `query` | string | Die ausgeführte Suchanfrage |
| `results` | array | Suchergebnisse des Tools |

## Hinweise

- Kategorie: `tools`
- Typ: `bocha`
48 changes: 48 additions & 0 deletions apps/docs/content/docs/en/tools/bocha.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: BoCha
description: Search the web using BoCha
---

[BoCha](https://bocha.cn/) is an AI-powered search API designed specifically for LLM applications. It provides reliable real-time information retrieval and is optimized for AI-driven use cases.

With BoCha in Sim, you can:

- **Search the web**: Instantly find answers, facts, and overviews for search queries
- **Get direct answers**: Retrieve precise responses for calculations, conversions, or factual queries
- **Access summaries**: Receive concise summaries or descriptions of search topics
- **Discover related topics**: Explore links and references related to your search

These capabilities allow Sim agents to automatically access up-to-date web knowledge—from presenting facts in workflows to enriching documents and analyses with the latest information.

## Usage

Use the BoCha Instant Answer API to search the web. It returns direct answers, summaries, and related topics.

## Tool

### `bocha_search`

Searches the web using the BoCha Instant Answer API and returns direct answers, summaries, and related topics.

#### Inputs

| Parameter | Type | Required | Description |
| --------- | ---- | ---- | ----------- |
| `query` | string | Yes | The search query to execute (e.g., "latest AI research papers 2024") |
| `freshness` | string | No | Time range for search results (noLimit / oneDay / oneWeek / oneMonth / oneYear / YYYY-MM-DD / YYYY-MM-DD..YYYY-MM-DD) |
| `summary` | boolean | No | Whether to return a text summary |
| `count` | number | No | Maximum number of results (1–50, e.g., 5) |
| `include` | string | No | Domains to include in the search, separated by `|` or `,` (max 100) |
| `exclude` | string | No | Domains to exclude from the search, separated by `|` or `,` (max 100) |

#### Outputs

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `query` | string | The executed search query |
| `results` | array | Results returned by the tool |

## Notes

- Category: `tools`
- Type: `bocha`
48 changes: 48 additions & 0 deletions apps/docs/content/docs/es/tools/bocha.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: BoCha
description: Buscar en la web con BoCha
---

[BoCha](https://bocha.cn/) es una API de búsqueda impulsada por IA diseñada específicamente para aplicaciones LLM. Proporciona recuperación de información en tiempo real y está optimizada para casos de uso con IA.

Con BoCha en Sim, puedes:

- **Buscar en la web**: Encontrar instantáneamente respuestas, hechos y resúmenes
- **Obtener respuestas directas**: Recuperar resultados precisos para cálculos, conversiones o consultas factuales
- **Acceder a resúmenes**: Recibir descripciones breves de temas de búsqueda
- **Descubrir temas relacionados**: Explorar enlaces y referencias relacionadas

Estas capacidades permiten a los agentes de Sim acceder automáticamente a conocimiento web actualizado, enriqueciendo flujos de trabajo, documentos y análisis.

## Uso

Utiliza la API de respuestas instantáneas de BoCha para buscar en la web. Devuelve respuestas directas, resúmenes y temas relacionados.

## Herramienta

### `bocha_search`

Busca en la web utilizando la API de respuestas instantáneas de BoCha.

#### Entradas

| Parámetro | Tipo | Requerido | Descripción |
| --------- | ---- | ---- | ----------- |
| `query` | string | Sí | Consulta de búsqueda (ej.: "latest AI research papers 2024") |
| `freshness` | string | No | Rango de tiempo de los resultados |
| `summary` | boolean | No | Si se debe devolver un resumen |
| `count` | number | No | Número máximo de resultados |
| `include` | string | No | Dominios incluidos |
| `exclude` | string | No | Dominios excluidos |

#### Salidas

| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `query` | string | Consulta ejecutada |
| `results` | array | Resultados devueltos |

## Notas

- Categoría: `tools`
- Tipo: `bocha`
48 changes: 48 additions & 0 deletions apps/docs/content/docs/fr/tools/bocha.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: BoCha
description: Recherche web avec BoCha
---

[BoCha](https://bocha.cn/) est une API de recherche alimentée par l’IA, conçue pour les applications LLM. Elle fournit un accès fiable à des informations en temps réel, optimisées pour les usages IA.

Avec BoCha dans Sim, vous pouvez :

- **Rechercher sur le web** : Obtenir instantanément des réponses et des faits
- **Recevoir des réponses directes** : Pour des calculs, conversions ou requêtes factuelles
- **Accéder à des résumés** : Descriptions concises de sujets de recherche
- **Découvrir des sujets connexes** : Liens et références associés

Ces fonctionnalités permettent aux agents Sim d’accéder automatiquement aux connaissances web les plus récentes.

## Utilisation

Utilisez l’API Instant Answer de BoCha pour effectuer des recherches web.

## Outil

### `bocha_search`

Recherche sur le web via l’API Instant Answer de BoCha.

#### Entrées

| Paramètre | Type | Requis | Description |
| --------- | ---- | ---- | ----------- |
| `query` | string | Oui | Requête de recherche |
| `freshness` | string | Non | Période temporelle |
| `summary` | boolean | Non | Retourner un résumé |
| `count` | number | Non | Nombre maximal de résultats |
| `include` | string | Non | Domaines inclus |
| `exclude` | string | Non | Domaines exclus |

#### Sorties

| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `query` | string | Requête exécutée |
| `results` | array | Résultats retournés |

## Remarques

- Catégorie : `tools`
- Type : `bocha`
48 changes: 48 additions & 0 deletions apps/docs/content/docs/ja/tools/bocha.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: BoCha
description: BoCha を使用した Web 検索
---

[BoCha](https://bocha.cn/) は、LLM アプリケーション向けに設計された AI 駆動の検索 API です。信頼性の高いリアルタイム情報検索を提供し、AI 利用シナリオに最適化されています。

Sim で BoCha を使用すると、次のことが可能です:

- **Web 検索**:検索クエリに対する回答・事実・概要を即座に取得
- **直接回答の取得**:計算、変換、事実ベースの質問への正確な回答
- **要約の取得**:検索トピックの簡潔な要約
- **関連トピックの発見**:関連リンクや参考資料の探索

これらの機能により、Sim エージェントは最新の Web 知識に自動的にアクセスできます。

## 使用方法

BoCha の Instant Answer API を使用して Web を検索します。

## ツール

### `bocha_search`

BoCha Instant Answer API を使用して Web を検索します。

#### 入力

| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | ---- | ----------- |
| `query` | string | はい | 実行する検索クエリ |
| `freshness` | string | いいえ | 検索結果の期間 |
| `summary` | boolean | いいえ | 要約を返すかどうか |
| `count` | number | いいえ | 最大結果数 |
| `include` | string | いいえ | 含めるドメイン |
| `exclude` | string | いいえ | 除外するドメイン |

#### 出力

| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `query` | string | 実行された検索クエリ |
| `results` | array | 検索結果 |

## 注意事項

- カテゴリ:`tools`
- タイプ:`bocha`
58 changes: 58 additions & 0 deletions apps/docs/content/docs/zh/tools/bocha.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
title: BoCha
description: 使用 BoCha 搜索
---

import { BlockInfoCard } from "@/components/ui/block-info-card"

<BlockInfoCard
type="bocha"
color="#FFFFFF"
/>

{/* MANUAL-CONTENT-START:intro */}
[BoCha](https://bocha.cn/) 是一款专为 LLM 应用设计的 AI 驱动搜索 API。它提供可靠的实时信息检索功能,并针对 AI 使用场景优化了功能.

在 Sim 中使用 BoCha,您可以:

- **搜索网页**:即时找到答案、事实和搜索查询的概述
- **获取直接答案**:检索计算、转换或事实查询的具体响应
- **访问摘要**:接收搜索主题的简短总结或描述
- **获取相关主题**:发现与搜索相关的链接和参考资料

这些功能使您的 Sim 代理能够自动访问最新的网络知识——从在工作流程中呈现事实,到通过最新信息丰富文档和分析。。
{/* MANUAL-CONTENT-END */}

## 使用说明

使用 BoCha 即时答案 API 搜索网页。返回即时答案、摘要、相关主题等。

## 工具

### `bocha_search`

使用 BoCha 即时答案 API 搜索网页。返回查询的即时答案、摘要和相关主题。

#### 输入

| 参数 | 类型 | 必需 | 描述 |
| --------- | ---- | ---- | ----------- |
| `query` | string | 是 | 要执行的搜索查询(例如:"latest AI research papers 2024") |
| `freshness` | string | 否 | 指定搜索结果的时间范围(noLimit / oneDay / oneWeek / oneMonth / oneYear / YYYY-MM-DD / YYYY-MM-DD..YYYY-MM-DD) |
| `summary` | boolean | 否 | 是否返回文本摘要 |
| `count` | number | 否 | 返回结果的最大数量(1–50,例如:5) |
| `include` | string | 否 | 限定搜索的网站域名范围,多个域名用 `|` 或 `,` 分隔,最多 100 个 |
| `exclude` | string | 否 | 从搜索结果中排除指定网站域名,多个域名用 `|` 或 `,` 分隔,最多 100 个 |


#### 输出

| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `query` | 字符串 | 已执行的搜索查询 |
| `results` | 数组 | 工具输出的结果 |

## 注意事项

- 类别:`tools`
- 类型:`bocha`
86 changes: 86 additions & 0 deletions apps/sim/blocks/blocks/bocha.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
import { BoChaIcon } from '@/components/icons'
import type { BlockConfig } from '@/blocks/types'
import type { BoChaSearchResponse } from '@/tools/bocha/types'

export const BoChaBlock: BlockConfig<BoChaSearchResponse> = {
type: 'bocha',
name: 'BoCha',
description: 'Search with BoCha',
longDescription:
'Search the web using BoCha Instant Answers API. Returns instant answers, abstracts, related topics, and more.',
docsLink: 'https://docs.sim.ai/tools/bocha',
category: 'tools',
bgColor: '#FFFFFF',
icon: BoChaIcon,
subBlocks: [
{
id: 'query',
title: 'Search Query',
type: 'long-input',
placeholder: 'Enter your search query',
required: true,
},
{
id: 'freshness',
title: 'Freshness',
type: 'long-input',
placeholder: 'noLimit',
description: 'Search for web pages within a specified time range(noLimit/oneDay/oneWeek/oneMonth/oneYear/YYYY-MM-DD/YYYY-MM-DD/YYYY-MM-DD..YYYY-MM-DD)',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo in description - duplicate YYYY-MM-DD in date format examples

Suggested change
description: 'Search for web pages within a specified time range(noLimit/oneDay/oneWeek/oneMonth/oneYear/YYYY-MM-DD/YYYY-MM-DD/YYYY-MM-DD..YYYY-MM-DD)',
description: 'Search for web pages within a specified time range(noLimit/oneDay/oneWeek/oneMonth/oneYear/YYYY-MM-DD/YYYY-MM-DD..YYYY-MM-DD)',
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/blocks/blocks/bocha.ts
Line: 28:28

Comment:
typo in description - duplicate `YYYY-MM-DD` in date format examples

```suggestion
            description: 'Search for web pages within a specified time range(noLimit/oneDay/oneWeek/oneMonth/oneYear/YYYY-MM-DD/YYYY-MM-DD..YYYY-MM-DD)',
```

How can I resolve this? If you propose a fix, please make it concise.

},
{
id: 'summary',
title: 'Show Summary',
type: 'switch',
defaultValue: false,
},
{
id: 'count',
title: 'Result Count',
type: 'short-input',
min: 1,
max: 50,
placeholder: 'e.g. 5',
},
{
id: 'include',
title: 'Include Domains',
type: 'long-input',
placeholder: 'example.com | arxiv.org',
description: 'Limit search to specific domains (separate by | or ,)',
},
{
id: 'exclude',
title: 'Exclude Domains',
type: 'long-input',
placeholder: 'spam.com | ads.example',
description: 'Exclude specific domains from search results',
},
{
id: 'apiKey',
title: 'API Key',
type: 'short-input',
placeholder: 'Enter your BoCha API key',
password: true,
required: true,
},
],
tools: {
access: ['bocha_search'],
config: {
tool: () => 'bocha_search',
},
},
inputs: {
query: { type: 'string', description: 'Search query terms' },
freshness: { type: 'string', description: 'Time range filter for search results' },
summary: { type: 'boolean', description: 'Whether to return a text summary' },
count: { type: 'number', description: 'Maximum number of search results to return' },
include: { type: 'string', description: 'Domains to include in search results' },
exclude: { type: 'string', description: 'Domains to exclude from search results' },
apiKey: { type: 'string', description: 'BoCha API key' },
},
outputs: {
query: { type: 'string', description: 'Search query used' },
results: { type: 'json', description: 'Array of external link results' },
},
}
Loading