Skip to content

Fix Gemini Palm2 request config#570

Open
P3xill wants to merge 1 commit into
arakoodev:tsfrom
P3xill:codex/gemini-palm2-request-config
Open

Fix Gemini Palm2 request config#570
P3xill wants to merge 1 commit into
arakoodev:tsfrom
P3xill:codex/gemini-palm2-request-config

Conversation

@P3xill
Copy link
Copy Markdown

@P3xill P3xill commented May 29, 2026

Summary

  • Fixes the Gemini/PaLM-compatible client so Google generation settings are sent in generationConfig rather than Axios config fields.
  • Exports Palm2AI plus typed Gemini request/response types from the AI package.
  • Adds mocked Palm2/Gemini unit coverage, a testcases/palm2 Jsonnet prompt config, and a Jsonnet-driven palm2-chat example.

Bounty

/claim #279

Validation

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

Demo

The focused test demonstrates the request generated from a prompt and confirms that model, API key header, contents, response MIME type, token limit, temperature, topP, and topK are sent to the Google Generative Language API in the expected shape. The example keeps the prompt text in Jsonnet rather than hardcoding it in TypeScript.

@github-actions
Copy link
Copy Markdown

CLA Assistant Lite bot: Thank you for your submission, we really appreciate it. Before we can accept your contribution, we ask that you sign the Arakoo Contributor License Agreement. You can sign the CLA by adding a new comment to this pull request and pasting exactly the following text.


I have read the Arakoo CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant