Description: This pull request adds the FUNCTION role property to the GeminiAiRequestModel class. This enhancement allows the model to handle messages that require a function role, enhancing the flexibility and extensibility of the chat application.
The reason for adding the FUNCTION case to the toGeminiContent method is to ensure extensibility. For example, while currently handling only user, model, and function roles, there is a possibility of adding other roles in the future, such as error, notification, command, and meta.
If the FUNCTION filter condition is not needed, please comment below. Thank you.
reference - #866
Comment From: tzolov
Addressed by the https://github.com/spring-projects/spring-ai/pull/1038