diff --git a/pkg/spec/src/actions.ts b/pkg/spec/src/actions.ts index 86022f3..317fe16 100644 --- a/pkg/spec/src/actions.ts +++ b/pkg/spec/src/actions.ts @@ -35,13 +35,13 @@ export function actions(generator: () => Action[]): GeneratorNode { } // llm selects the LLM action backend: instead of the seeded picker drawing a -// random candidate, Go drives an OpenAI-compatible model that chooses which -// candidate to act on from the screenshot + the candidate list. The returned -// marker is inert on the JS picker (pick.ts walks it to null); Go reads its -// config off globalThis.actions. API key comes from OPENROUTER_API_KEY -// (OpenRouter) or OPENAI_API_KEY (OpenAI); OpenRouter wins when both are set. -// Optional `instructions` are appended to the model's prompt as generic -// bug-hunting guidance for this spec; the model still only ranks candidates. +// random candidate, Go drives an OpenAI-compatible model that picks one +// candidate from the screenshot + the numbered candidate list. Assign it to the +// `generator` export; Go reads the config off globalThis.generator and the +// marker is inert on the JS picker (pick.ts walks it to null). API key comes +// from OPENROUTER_API_KEY (OpenRouter) or OPENAI_API_KEY (OpenAI); OpenRouter +// wins when both are set. Optional `instructions` are appended to the model's +// prompt to describe the app under test. export function llm(config: { model: string; instructions?: string }): GeneratorNode { return { kind: "llm", config }; }