/claim #279
generationConfig request body instead of the Axios config object.Palm2AI alias for the PaLM2/Gemini bounty API surface.src/ai/src/tests/palm2.src/ai/src/testcases/palm2 Jsonnet prompt config.examples/palm2-chat example with no hardcoded prompt in TypeScript.palm2 test path: yestestcases/palm2 Jsonnet prompt config: yesnpx vitest run src/ai/src/tests/palm2/gemini.test.tsnpm run buildnpm start from JS/edgechains/examples/palm2-chatShort demo GIF:
The example dry-runs without credentials and prints the Jsonnet-loaded chat options. Set GEMINI_API_KEY to call the live Google Generative Language API.
Full demo transcript, included so the output remains reviewable even if GitHub clips the embedded media:
EdgeChains #279 demo: PaLM2/Gemini Jsonnet example
Prompt, model, and generation settings are loaded from Jsonnet.
$ cd JS/edgechains/examples/palm2-chat
$ npm start
Loaded Jsonnet prompt:
Explain how EdgeChains can call Gemini through a typed provider in one sentence.
Loaded model:
gemini-pro
Dry-run request:
generationConfig.temperature = 0.2
generationConfig.maxOutputTokens = 128
No GEMINI_API_KEY found, so the example stops before the live API call.
Set GEMINI_API_KEY to call Google Generative Language API.
✓ npx vitest run src/ai/src/tests/palm2/gemini.test.ts
jonahsills
@jonahsills
Arakoo.ai
@arakoodev