Add Palm2 AI provider - #632
Conversation
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
|
Quick status note for reviewers:\n\n- Retargeted this PR to the repository's s branch, which contains the JS SDK touched by issue #279. The PR is now mergeable against s.\n- The js check is passing.\n- The failing wasm job appears unrelated to this change: it fails during action setup because the workflow uses deprecated �ctions/cache@v2, before checking out or building this branch.\n- CLA remains pending for my GitHub account and I will handle that separately. |
|
recheck |
3616da2 to
908a2e2
Compare
|
recheck |
|
Updated status for reviewers:\n\n- This PR targets the ts branch, where the JS SDK for issue #279 lives.\n- The branch is mergeable.\n- The JS check is passing.\n- The PR body includes /claim #279 for the Algora bounty.\n- The only required contributor action left is signing the Arakoo CLA from the PR author account.\n\nThe earlier wasm failure was from the previous main-base run and failed during workflow setup because actions/cache v2 is deprecated; after retargeting to ts, the current required PR Build checks are changes/js green and java skipped. |
|
Verification/demo notes:\n\n- The new Palm2AI test suite mocks Google Generative Language requests and verifies the generated URL, headers, default request body, and overridden model/generation settings.\n- The Jsonnet example is under JS/edgechains/examples/chat-with-palm2 and keeps the prompt template in jsonnet/main.jsonnet, with TypeScript only bridging the sync RPC call.\n- Local verification rerun:\n - npx tsc -b\n - npx jest src/ai/src/tests/palm2/palm2.test.ts --runInBand\n\nBoth commands pass locally. I cannot include a live Google API call without a real PALM2_API_KEY, so the demo coverage is request-shape based and does not require secrets. |
|
I have read the Arakoo CLA Document and I hereby sign the CLA |
|
recheck |
|
CLA is signed and passing now. The PR is mergeable against the ts branch, with changes/js checks passing and /claim #279 included in the PR body. Ready for review when you have a chance. |
|
Follow-up update for review:\n\n- Strengthened the Palm2 test from an axios function mock to a local HTTP-backed request test. The test now stands up a local endpoint and verifies the actual POST path, query key, and request body sent by Palm2AI.\n- Added a testcases/palm2/basic.jsonnet fixture to match the bounty's requested Palm2 testcase folder.\n- Re-ran local verification:\n - npx tsc -b\n - npx jest src/ai/src/tests/palm2/palm2.test.ts --runInBand\n\nThe refreshed GitHub checks are green as well. |
Adds a Palm2AI provider for Google PaLM2 text generation.\n\n/claim #279\n\nChanges:\n- Adds Palm2AI with configurable API key, model, API version, retry count, and generation settings\n- Exports Palm2AI from the AI package entrypoint\n- Adds Jest coverage under src/ai/src/tests/palm2 for default and overridden PaLM2 request settings\n- Adds a chat-with-palm2 example using Jsonnet + sync RPC\n\nVerification:\n- npx tsc -b\n- npx jest src/ai/src/tests/palm2/palm2.test.ts --runInBand\n\nCloses #279