JavaScript track: exercise 07's OrchestrationClient constructor missing resourceGroup

Aperta Adatta ai principianti
#34 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
84/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
typescript
Ambito
ai

Direzione di ricerca

Confronta il costruttore di OrchestrationClient in exercises/JavaScript/07-solve-the-crime.md e project/JavaScript/solution/src/investigationWorkflow.ts con i costruttori funzionanti in tools.ts del track. Conferma che entrambi i costruttori passino process.env.RESOURCE_GROUP come secondo argomento e assicurati che l’esercizio e la soluzione mostrino lo stesso comportamento corretto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
54
Fork
36
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di SAP-samples/codejam-code-based-agents

Tutte le issue di SAP-samples/codejam-code-based-agents

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.