Loading...
Loading...
Compare original and translation side by side
curljqjqexport LLAMA_BASE="https://api.cloud.llamaindex.ai/api/v1" # EU accounts: https://api.cloud.eu.llamaindex.ai/api/v1
AUTH=(-H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" -H "Content-Type: application/json")401403LLAMA_CLOUD_API_KEYexport LLAMA_BASE="https://api.cloud.llamaindex.ai/api/v1" # 欧盟账号请使用:https://api.cloud.eu.llamaindex.ai/api/v1
AUTH=(-H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" -H "Content-Type: application/json")401403LLAMA_CLOUD_API_KEY| Operation | Call | Key body fields |
|---|---|---|
| List indexes | | — |
| Retrieve passages | | |
| Find files | | |
| Grep a file | | |
| Read a file | | |
file_id| 操作 | 调用方式 | 请求体核心字段 |
|---|---|---|
| 列出索引 | | — |
| 检索段落 | | |
| 查找文件 | | |
| 文件内容匹配 | | |
| 读取文件 | | |
curl -s "${AUTH[@]}" "$LLAMA_BASE/indexes" | jq '.items[] | {id, name, description}'curl -s "${AUTH[@]}" "$LLAMA_BASE/indexes" | jq '.items[] | {id, name, description}'GET /indexesfindgrepretrievereadGET /indexesfindgrepretrieveread| Situation | Start with |
|---|---|
| Open or conceptual question ("what does the report say about churn?") | |
| Question spans multiple documents or you don't know the wording used | |
| Looking for an exact term, identifier, figure, or section heading in a known file | |
| The user names or implies a specific document ("in the Q3 report…") | |
| You need continuous context around a passage you already located | |
retrievegrep"static_filters": {"parsed_directory_file_id": {"operator": "eq", "value": "<file-id>"}}top_krerank.top_ncontext_charsoffsetmax_length| 场景 | 起始调用 |
|---|---|
| 开放式或概念性问题(如“报告中关于客户流失的内容是什么?”) | |
| 问题涉及多个文档或你不清楚文档中的表述方式 | |
| 在已知文件中查找精确术语、标识符、数据或章节标题 | |
| 用户明确提及或暗示特定文档(如“在第三季度报告中……”) | |
| 需要已定位段落的连续上下文 | 使用 |
retrievegrep"static_filters": {"parsed_directory_file_id": {"operator": "eq", "value": "<file-id>"}}top_krerank.top_ncontext_charsoffsetmax_lengthundefinedundefined
Batch independent lookups into one command instead of one call per turn — several greps or retrievals in a single `for`-loop with labeled output cost one round-trip, not five.
将独立查询批量整合为一个命令,而非每次对话仅执行一次调用——在单个`for`循环中执行多个grep或检索并添加标签输出,仅需一次往返,而非五次。static_fields.page_range_start_endstatic_fields.page_range_start_endreadretrievejqreadretrievejqhttps://mcp.llamaindex.ai/mcp/index/{indexId}/mcphttps://mcp.llamaindex.ai/mcp/index/{indexId}/mcp