SAP-samples / SAP-samples/codejam-code-based-agents
JavaScript track: exercise 07's OrchestrationClient constructor missing resourceGroup
まだ誰も着手していません。
- 主要言語
- 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 にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
exercises/JavaScript/07-solve-the-crime.md と project/JavaScript/solution/src/investigationWorkflow.ts の OrchestrationClient コンストラクターを、track の tools.ts にある動作するコンストラクターと比較してください。両方のコンストラクターが process.env.RESOURCE_GROUP を 2 番目の引数として渡していることを確認し、exercise と solution が同じ修正済みの動作を示すようにしてください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript
- 領域
- ai
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 静か
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 84/100