SAP-samples / SAP-samples/codejam-code-based-agents
JavaScript track: exercise 07's OrchestrationClient constructor missing resourceGroup
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 54
- Fork
- 36
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
So sánh constructor của OrchestrationClient trong exercises/JavaScript/07-solve-the-crime.md và project/JavaScript/solution/src/investigationWorkflow.ts với các constructor đang hoạt động trong tools.ts của track. Xác nhận rằng cả hai constructor đều truyền process.env.RESOURCE_GROUP làm đối số thứ hai, và đảm bảo exercise và solution thể hiện cùng một hành vi đã được sửa.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- typescript
- Lĩnh vực
- ai
- Loại issue
- Lỗi
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 84/100