Maplemx / Agently

[AI Agent Application Development Framework] - 🚀 Build AI agent native application in very few code 💬 Easy to interact with AI agent in code using structure data and chained-calls syntax 🧩 Enhance AI Agent using plugins instead of rebuild a whole new agent
http://agently.tech
Apache License 2.0
906 stars 100 forks source link

this project is exciting, but can you provide a use case for the function_call based on gemini-pro? #39

Open Sumnus00 opened 6 months ago

Sumnus00 commented 6 months ago

Because gemini-pro is fast and free.

Maplemx commented 6 months ago

sure, in fact you can simply change settings to use Gemini Pro

firstly, clone / copy this file to your workspace: https://github.com/Maplemx/Agently/blob/main/playground/function_calling.py

then, find this part of code:

agent_factory\
    .set_settings("current_model", "ERNIE")\
    .set_settings("model.ERNIE.model_name", "ERNIE")\
    .set_settings("model.ERNIE.auth", { "aistudio": "<YOUR-ERNIE-ACCESS-TOKEN>" })

change it to:

agent_factory\
   .set_settings("current_model", "Google")\
   .set_settings("model.Google.auth". { "api_key": "<Your-Google-API-Key-Here>" })

then you can use Gemini Pro to drive the agent to do function calling.

To explore more, you can read: https://github.com/Maplemx/Agently/blob/main/docs/guidebook/application_development_handbook.ipynb