JavaScript track: exercise 07's OrchestrationClient constructor missing resourceGroup
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 84/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 冷清
- 技術堆疊
- typescript
- 領域
- ai
研究方向
將 exercises/JavaScript/07-solve-the-crime.md 和 project/JavaScript/solution/src/investigationWorkflow.ts 中的 OrchestrationClient 建構函式與 track 的 tools.ts 中可正常運作的建構函式進行比較。確認兩個建構函式都將 process.env.RESOURCE_GROUP 作為第二個引數傳入,並確保 exercise 和 solution 展示相同的修正後行為。
由索引模型根據 Issue 內容生成。
描述
Summary
07-solve-the-crime.md instructs learners to write an OrchestrationClient constructor missing the resourceGroup argument:
typescript constructor(model: string = process.env.MODEL_NAME!) { this.orchestrationClient = new OrchestrationClient({ promptTemplating: { model: { name: model, params: { temperature: 0.7, max_tokens: 2000 } } }, }); this.graph = this.buildGraph(); }
Unlike every other OrchestrationClient in this track (groundingClient/webSearchClient in tools.ts, both of which correctly pass { resourceGroup: process.env.RESOURCE_GROUP } as the second constructor argument), this one omits it entirely. Same bug exists in project/JavaScript/solution/src/investigationWorkflow.ts.
Effect
Any tenant not using AI Core's default resource group (which the exercises themselves warn against — see 05-add-the-grounding-service.md: "DO NOT USE THE DEFAULT default RESOURCE GROUP!") gets:
Error: No deployment matched the given criteria: {"scenarioId":"orchestration"}. Make sure the deployment is successful...
thrown from both intelligenceResearcherNode (the report-synthesis call after the sonar-pro searches) and leadDetectiveNode, since both use this.orchestrationClient.
Suggested fix
```diff
this.orchestrationClient = new OrchestrationClient({
promptTemplating: { model: { name: model, params: { temperature: 0.7, max_tokens: 2000 } } },
- });
- }, { resourceGroup: process.env.RESOURCE_GROUP });
```
in bothexercises/JavaScript/07-solve-the-crime.mdand `project/JavaScript/solution/src/investigationWorkflow.ts`.
Environment
Reproduced on a personal SAP AI Core tenant (not the shared CodeJam subaccount), JavaScript/TypeScript track, exercises 01–07 followed in order.
- 主要語言
- Python
- 星號
- 54
- 分支
- 36
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
SAP-samples/codejam-code-based-agents 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
-
難度 1/5 1 小時以內 新手友好度 88/100
-
難度 2/5 1-3 小時 新手友好度 76/100
SAP-samples/codejam-code-based-agents#37 · 1 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 78/100
SAP-samples/codejam-code-based-agents#35 · 1 則留言 ·
-
難度 3/5 1-2 天 新手友好度 65/100
查看 SAP-samples/codejam-code-based-agents 的全部 Issue
相似的 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 86/100
zostera/django-bootstrap4#894 ·
-
難度 2/5 1-3 小時 新手友好度 78/100
use-agent-os/agent-os#3276 ·
-
難度 2/5 1-3 小時 新手友好度 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
難度 2/5 1-3 小時 新手友好度 88/100
NousResearch/hermes-agent#117848 ·
-
難度 2/5 1-3 小時 新手友好度 82/100
zilliztech/memsearch#759 ·