EvanZhouDev / gemini-ai

The simpler JavaScript Gemini SDK
https://www.npmjs.com/package/gemini-ai
GNU General Public License v3.0
102 stars 20 forks source link

Function calling support #13

Open XInTheDark opened 3 months ago

XInTheDark commented 3 months ago

Hi, is there any possibility of supporting function calling (beta)? For example, my use case is to add web search capability to the AI.

Some relevant docs & examples: https://ai.google.dev/gemini-api/docs/function-calling https://ai.google.dev/gemini-api/docs/function-calling#function-calling-curl-samples https://ai.google.dev/gemini-api/docs/function-calling#multi-turn-example-1

EvanZhouDev commented 3 months ago

This is on my roadmap. However, it may take some time to implement, as I am going out on a trip soon.

Here's a roadmap of what I am doing right now:

EvanZhouDev commented 3 months ago

Quick update! Safety Settings, System Prompt, and JSON Schema Response have all been deployed in v2.2.

I have not yet started Function Calling, and as I am going on vacation, I may be away for a while. The other reason I am reluctant to start implementing this is that it is quite a major change to the API, and given that the system is still in Beta, and potentially subject to changes, I will likely hold off until they get a stable release.