You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I just checked the app and the code, we do have support using Google Gemini (Chat Completion API) as a service provider. But right now we don't have a good enough prompt strategy for using chat completion APIs as a code completion provider. So chat completion APIs are not recommended at the moment.
If you want to help, you can try creating a RequestStrategy that works for Google Gemini. In the request strategy, you will have to define the rule to generate the prompt and to parse the response for the code completion. You can use AnthropicRequestStrategy as an example.
Another thing you may want to try is to let the model return the code completion as a tool call. But tool calling is not implemented in this project so it may require some extra work. Please check GoogleGeminiService for details. You may also need to update the dependency google/generative-ai-swift for the latest features of Google Gemini.
Activity
intitni commentedon May 2, 2025
Hello, I just checked the app and the code, we do have support using Google Gemini (Chat Completion API) as a service provider. But right now we don't have a good enough prompt strategy for using chat completion APIs as a code completion provider. So chat completion APIs are not recommended at the moment.
If you want to help, you can try creating a
RequestStrategythat works for Google Gemini. In the request strategy, you will have to define the rule to generate the prompt and to parse the response for the code completion. You can useAnthropicRequestStrategyas an example.Another thing you may want to try is to let the model return the code completion as a tool call. But tool calling is not implemented in this project so it may require some extra work. Please check
GoogleGeminiServicefor details. You may also need to update the dependencygoogle/generative-ai-swiftfor the latest features of Google Gemini.Pull requests are always welcome!