Skip to content

Fix Gemini generation config request shape#548

Open
g8rr5dg2p7-svg wants to merge 1 commit into
arakoodev:tsfrom
g8rr5dg2p7-svg:codex/palm2-gemini-request-shape
Open

Fix Gemini generation config request shape#548
g8rr5dg2p7-svg wants to merge 1 commit into
arakoodev:tsfrom
g8rr5dg2p7-svg:codex/palm2-gemini-request-shape

Conversation

@g8rr5dg2p7-svg
Copy link
Copy Markdown

/claim #279

Summary:

  • Fixes the existing Gemini/PaLM-compatible client so generation settings are sent inside the Google generationConfig request body.
  • Exports typed Gemini request/response interfaces from the AI package entrypoint.
  • Adds a testcases/palm2 Jsonnet config.
  • Adds mocked Vitest coverage for Gemini request shape and chat-style contents.
  • Adds a small Jsonnet-driven palm2-chat example.

Verification:

  • npm run build
  • npx vitest run src/ai/src/tests/palm2/gemini.test.ts
  • npx prettier --check src/ai/src/index.ts src/ai/src/lib/gemini/gemini.ts src/ai/src/tests/palm2/gemini.test.ts ../examples/palm2-chat/package.json ../examples/palm2-chat/readme.md ../examples/palm2-chat/src/index.ts ../examples/palm2-chat/src/lib/generateResponse.cts ../examples/palm2-chat/tsconfig.json
  • npx tsc --noEmit in JS/edgechains/examples/palm2-chat after package build

Notes:

  • Keeps the implementation in the existing GeminiAI class while making the request body match the Generative Language API.
  • Prompts for the example live in Jsonnet rather than being hardcoded in TypeScript.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant