> ## Documentation Index
> Fetch the complete documentation index at: https://docs.querying.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Baidu Wenxin API: Baiduの中国向けAIチャットの回答と出典

> Baiduの中国向けAIチャットWenxin（文心）に質問し、回答、読んだページ、検索クエリを受け取ります。

`BAIDU_WENXIN` は Baidu の Wenxin チャット（文心、wenxin.baidu.com）にゲストとして質問します。回答の前にウェブを検索し、アカウントやログインは使いません。

| | |
| - | - |
| taskType | `BAIDU_WENXIN` |
| 読むフィールド | `prompt`（なければ `query`） |
| クレジット | 1.25 |
| 国 | **無視されます。** すべてのタスクを中国本土から質問します。 |

## リクエスト

Wenxin は中国本土からのゲストにだけ回答するため、すべてのタスクは中国本土の出口から送られ、`country` はこれを変えません。省略できます。

```bash theme={"theme":"css-variables"}
curl -X POST https://api.querying.ai/v1/async/task \
  -H "Authorization: Bearer $QUERYING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "taskType": "BAIDU_WENXIN", "payload": { "prompt": "上海有哪些适合周末去的博物馆" } }'
```

## レスポンス

| フィールド | 型 | 説明 |
| - | - | - |
| `text` | string | 回答。 |
| `markdown` | string | Markdown の回答。フラグなしで返ります。 |
| `searchQueries` | string\[] | Wenxin が回答の前に実行した検索。 |
| `sources` | array | Wenxin が読んだページ: `position`、`url`、`label`、`source`（サイト名）。 |
| `rawResponse` | object | 回答と一緒に表示されたカード（場所、商品、画像）を `components` として。`include.rawResponse` のときだけ。 |

回答本文に引用マークはありません。`sources` は Wenxin が引用したものではなく、読んだものです。1つの回答で通常30前後のページを読みます。

例:

```json theme={"theme":"css-variables"}
{
  "text": "上海适合周末去的博物馆有上海博物馆东馆 ...",
  "markdown": "上海适合周末去的博物馆有**上海博物馆东馆** ...",
  "searchQueries": ["上海 周末 博物馆 推荐"],
  "sources": [{ "position": 1, "url": "https://www.example.com/shanghai-museums", "label": "上海博物馆推荐", "source": "example.com" }]
}
```

## includeフラグ

| フラグ | 効果 |
| - | - |
| `rawResponse` | `rawResponse` を追加します。 |

`markdown` と `searchQueries` にフラグは不要です。`ads`、`shopping` は効果がありません。`analysis` は `422 VALIDATION_ERROR` で、`citationAnalysis` は `400 VALIDATION_ERROR` で、`html` は `422 EVIDENCE_UNSUPPORTED` で拒否されます。[Markdownと生のレスポンス](https://docs.querying.ai/ja/engines/response-options.md)を参照してください。

## 関連ページ

* [Baidu Wenxin製品ページ](https://querying.ai/ja/engines/baidu-wenxin)
* [Doubao](https://docs.querying.ai/ja/engines/doubao.md)
* [エンジンの概要](https://docs.querying.ai/ja/engines/overview.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.