Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions camel/types/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ class ModelType(UnifiedModelType, Enum):

# Gemini models
GEMINI_3_PRO = "gemini-3-pro-preview"
GEMINI_3_FLASH = "gemini-3-flash-preview"
GEMINI_2_5_FLASH = "gemini-2.5-flash"
GEMINI_2_5_PRO = "gemini-2.5-pro"
GEMINI_2_0_FLASH = "gemini-2.0-flash"
Expand Down Expand Up @@ -853,6 +854,7 @@ def is_gemini(self) -> bool:
"""
return self in {
ModelType.GEMINI_3_PRO,
ModelType.GEMINI_3_FLASH,
ModelType.GEMINI_2_5_FLASH,
ModelType.GEMINI_2_5_PRO,
ModelType.GEMINI_2_0_FLASH,
Expand Down Expand Up @@ -1557,6 +1559,7 @@ def token_limit(self) -> int:
return 512_000
elif self in {
ModelType.GEMINI_3_PRO,
ModelType.GEMINI_3_FLASH,
ModelType.GEMINI_2_5_FLASH,
ModelType.GEMINI_2_5_PRO,
ModelType.GEMINI_2_0_FLASH,
Expand Down
32 changes: 20 additions & 12 deletions examples/models/gemini_model_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,25 +69,33 @@
'''


# Example of using the gemini-2.5-pro model
model_2_5_pro_pre = ModelFactory.create(
# Example of using the gemini-3-flash model
model_3_flash = ModelFactory.create(
model_platform=ModelPlatformType.GEMINI,
model_type=ModelType.GEMINI_2_5_PRO,
model_type=ModelType.GEMINI_3_FLASH,
model_config_dict=GeminiConfig(temperature=0.2).as_dict(),
)
camel_agent_pro = ChatAgent(system_message=sys_msg, model=model_2_5_pro_pre)
response_pro = camel_agent_pro.step(user_msg)
print(response_pro.msgs[0].content)
camel_agent_flash = ChatAgent(system_message=sys_msg, model=model_3_flash)
user_msg = """
Explain how Generative AI works in short language.
"""
response_flash = camel_agent_flash.step(user_msg)
print(response_flash.msgs[0].content)

'''
===============================================================================
Hello and a big hi to the entire CAMEL AI community!
Generative AI works in three simple steps:

It's fantastic to acknowledge your dedication to
the important and fascinating study of autonomous and communicative agents.
Open-source collaboration is the engine of innovation,
and your work is pushing the boundaries of what's possible in AI.
1. **Training:** It "reads" or "looks at" massive amounts of existing data
(like books, code, or images) to learn patterns, styles, and structures.
2. **Prediction:** When you give it a prompt, it doesn't "think"—it
calculates probability. It predicts what word, pixel, or note should come next
based on the patterns it learned.
3. **Creation:** By repeating these predictions millions of times per second,
it generates entirely new content that looks or sounds like it was made by a
human.

Keep up the brilliant research and community building
**In short:** It is a super-powered version of **autocomplete** that uses math
to guess the most likely next piece of information.
===============================================================================
'''
Loading