Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.

fix: Gemini system prompt #381

Merged
merged 1 commit into from
Jul 7, 2025

Conversation

valtzu
Copy link
Contributor

@valtzu valtzu commented Jul 7, 2025

I started to get 400 Bad Request from Gemini API, not sure if it was due to changing a model or what. Changing system_instruction.parts into a list like in the docs fixed it.

Tested at least with gemini-1.5-pro and gemini-2.5-pro and gemini-2.0-flash, works fine.

@OskarStark
Copy link
Contributor

Makes sense based on the key name "parts"

Copy link
Member

@chr-hertel chr-hertel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @valtzu - make sense! 👍

@chr-hertel chr-hertel merged commit 71714f5 into php-llm:main Jul 7, 2025
7 checks passed
chr-hertel added a commit to symfony/ai that referenced this pull request Jul 12, 2025
This PR was merged into the main branch.

Discussion
----------

fix: Gemini system prompt

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| Docs?         | no
| Issues        |
| License       | MIT

Cherry picking php-llm/llm-chain#381

Commits
-------

88be4b3 fix: Gemini system prompt (#381)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants