gorilla
gorilla copied to clipboard
support Gemini model
Hi vandyxiaowei,
This is Fanjia. I am so glad you make this PR as we had a headache writing the right function calling for Gemini ! I was reproducing with Gemini, I was blocked by the IAM authentication.
HTTP content: {'error': {'code': 403, 'message': "Permission 'aiplatform.endpoints.predict' denied on resource '//aiplatform.googleapis.com/projects/cloud-llm-preview1/locations/us-central1/publishers/google/models/gemini-pro' (or it may not exist).", 'status': 'PERMISSION_DENIED', 'details': [{'@type': 'type.googleapis.com/google.rpc.ErrorInfo', 'reason': 'IAM_PERMISSION_DENIED', 'domain': 'aiplatform.googleapis.com', 'metadata': {'resource': 'projects/cloud-llm-preview1/locations/us-central1/publishers/google/models/gemini-pro', 'permission': 'aiplatform.endpoints.predict'}}]}}
I will keep working on getting the authentication through and merging the PR in. Appreciate any insight.
Thank you so much.
Hi, Fanjia.
This PR is for my own testing. You need to use your own GCP project and provide the access token.
Some attributes (e.g., "default", "optional") in OpenAPI schema are not supported in Gemini API today, which will return INVALID_ARGUMENT error that negatively affects the results. I have some code there to filter those out from function declaration.
I also had some questions posted here: https://github.com/ShishirPatil/gorilla/issues/235. Would love to hear your suggestions.
Thanks, Xiaowei