Commit d7e011a
fix(openapi): dataset 改自由字串,解除 GPT 只能查 17 個 dataset 的限制
問題:chatgpt/openapi.yaml 的 queryDataset,dataset 參數寫死成只有 17 個的
enum。ChatGPT 把 enum 當白名單驗證,導致 Custom GPT 實際上只能查這 17 個,
但 FinMind 走 /api/v4/data 的 dataset 有 87 個(datasets.md 共 90,其中 3 個
走專屬 endpoint)。knowledge bundle 已完整列出 90 個含參數/層級,GPT「知道」
卻被 action 擋住。enum 是早期 17 MVP 的殘留,與已擴充到 90 的知識包 drift。
修正:移除 dataset 的 enum,改為自由字串(仍 required),描述指向 knowledge
bundle、要求只用 bundle 列出的名稱。87 個 /data dataset 全可查、未來新增
dataset 不需再改 openapi。
註:MCP server 的 query_dataset 工具本來就是自由字串、無此限制,故此修正
僅動 chatgpt/openapi.yaml(GPT-only)。3 個專屬 endpoint dataset 仍未提供
對應 action,本次不在範圍。
驗證:openapi 解析通過(dataset 無 enum、type=string、required)、32 tests
passed、build_instructions 7986/8000。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 1bd98e3 commit d7e011a
1 file changed
Lines changed: 5 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | 27 | | |
42 | 28 | | |
43 | 29 | | |
| |||
0 commit comments