SAP-samples / SAP-samples/codejam-code-based-agents
JavaScript track: exercise 07's OrchestrationClient constructor missing resourceGroup
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 54
- 派生
- 36
- PR 合并指标
- 30 天内没有已合并 PR
描述
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.
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
将 exercises/JavaScript/07-solve-the-crime.md 和 project/JavaScript/solution/src/investigationWorkflow.ts 中的 OrchestrationClient 构造函数与 track 的 tools.ts 中可正常工作的构造函数进行比较。确认两个构造函数都将 process.env.RESOURCE_GROUP 作为第二个参数传入,并确保 exercise 和 solution 展示相同的修正后行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- typescript
- 领域
- ai
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 冷清
- 描述清晰度
- 描述清楚
- 新手友好度
- 84/100