文章大纲
Google Vertex AI 无 RAG 函数调用查表模式
——制造业日志根因分析的最小依赖、省 Token、高实时性落地指南
(完全对齐官方 Function Calling 文档,仅使用 Vertex AI 托管服务)
1 方案总览(与官方文档映射)
官方步骤 | Vertex AI 对应实现 | 制造业场景落地 |
---|---|---|
① 设置环境 | pip install google-cloud-aiplatform |
单文件 Cloud Function |
② 声明函数 | FunctionDeclaration 描述 query_equipment |
JSON Schema 描述 Excel 表字段 |
③ 提交提示 | GenerativeModel.generate_content |
日志原文 |
④ 调用外部 | Cloud Function → SQLite/Sheet API | 查本地 SQLite 或 BigQ |