CrosswaveOmega / GPT-Function-Calling-Utility

A simple package that provides a set of utilities to make it easier to invoke discord.py commands and regular python methods with OpenAI's Function Calling API.
MIT License
1 stars 0 forks source link

Support for gemini function calling? #4

Open holymode opened 7 months ago

holymode commented 7 months ago

What are your thoughts about adding support for gemini function calling? https://ai.google.dev/docs/function_calling

Shouldnt be too complicated.

CrosswaveOmega commented 7 months ago

Based on this document, it appears gemini function calling requires the function definitions to be made using the classes/types defined within the google-generativeai package, which is internally different from the format OpenAI's requires for function calling (a JSON encoded dictionary).

https://json-schema.org/understanding-json-schema

I'd have to either create a completely separate schema generation system just for Gemini (which is out of the question as it will make custom converters harder to implement), or create a bulky translator module that turns the JSON Schema compatible Dictionary OpenAI package uses into something that the google-generativeai package can give to Gemini.

Invoking the functions would require it's own set of changes.