JavaScript track: exercise 07's OrchestrationClient constructor missing resourceGroup

未關閉 適合新手
#34 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 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 both exercises/JavaScript/07-solve-the-crime.md and `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

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

SAP-samples/codejam-code-based-agents 的其他 Issue

查看 SAP-samples/codejam-code-based-agents 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。