Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass system message as system_instruction to Gemini #1011. #1090

Merged
merged 11 commits into from
Feb 26, 2025

Conversation

liminma
Copy link
Collaborator

@liminma liminma commented Feb 21, 2025

@rjambrecic

Why are these changes needed?

Gemini supports system instructions. Sending the system_message as a system_instruction could potentially be more effective.

Related issue number

Fixes #1011

Checks

@CLAassistant
Copy link

CLAassistant commented Feb 21, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@sonichi sonichi left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution. Thanks to this PR, I found some issues with the current documentation in https://docs.ag2.ai/docs/user-guide/models/google-gemini.

Copy link
Collaborator

@marklysze marklysze left a comment

Choose a reason for hiding this comment

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

Thanks @liminma!

@marklysze marklysze added this pull request to the merge queue Feb 26, 2025
Merged via the queue into ag2ai:main with commit 3fc70f0 Feb 26, 2025
12 checks passed
Copy link

codecov bot commented Feb 26, 2025

Codecov Report

Attention: Patch coverage is 5.26316% with 18 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
autogen/oai/gemini.py 5.26% 18 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (0790aae) and HEAD (154b59b). Click for more details.

HEAD has 1273 uploads less than BASE
Flag BASE (0790aae) HEAD (154b59b)
core-without-llm 15 1
3.9 78 0
ubuntu-latest 147 1
3.13 88 0
macos-latest 108 0
3.11 67 1
3.10 97 0
commsagent-discord 9 0
optional-deps 139 0
3.12 39 0
browser-use 7 0
windows-latest 114 0
commsagent-slack 9 0
commsagent-telegram 9 0
crawl4ai 13 0
docs 6 0
graph-rag-falkor-db 6 0
interop 13 0
interop-crewai 9 0
interop-langchain 9 0
interop-pydantic-ai 9 0
jupyter-executor 9 0
twilio 9 0
retrievechat 10 0
retrievechat-pgvector 10 0
websockets 9 0
retrievechat-mongodb 10 0
retrievechat-qdrant 11 0
agent-eval 1 0
gpt-assistant-agent 3 0
lmm 4 0
teachable 4 0
gemini 15 0
websurfer 15 0
anthropic 16 0
bedrock 14 0
cerebras 14 0
llama-index-agent 3 0
retrievechat-couchbase 3 0
cohere 15 0
groq 14 0
ollama 14 0
mistral 14 0
together 14 0
swarm 14 0
reasoning 14 0
long-context 3 0
integration 12 0
falkordb 2 0
autobuild 1 0
core-llm 4 0
neo4j 2 0
deepseek 1 0
openai 1 0
Files with missing lines Coverage Δ
autogen/oai/gemini.py 13.01% <5.26%> (-46.94%) ⬇️

... and 62 files with indirect coverage changes

@liminma
Copy link
Collaborator Author

liminma commented Feb 27, 2025

Thanks @liminma!

Glad to have contributed to the project! Thanks for merging.

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.

System message not passed to Gemini as system_instruction
5 participants