client
client copied to clipboard
Google Gemini API PHP Client allows you to use the Gemini AI model
Add two new models to ModelName constant class (Gemini 2.0 Flash and Gemini 2.0 Flash-Lite). https://ai.google.dev/gemini-api/docs/models
Hello, I'm using ``` $input = "Do something"; $client->geminiFlash()->generateContent($input); ``` And sometimes it fails with the following output (finishReason RECITATION): It happens for eg. when I want to translate a...
I love this library, it would be nice feature to add support for grounding. https://ai.google.dev/gemini-api/docs/grounding?lang=rest
This text is not clear: Gemini API PHP client does not come with an HTTP client. If you are just testing or do not have an HTTP client library in...
Some people think Composer is a sick joke. Please provide a way for those people to install your library without composer.
We do this on `sendMessage`: ``` $config = (new GenerationConfig()) ->withCandidateCount(1); $response = $this->model ->withGenerationConfig($config) ->generateContentWithContents($this->history); ``` Which overwrittes any previously defined generation config.
## Overview This pull request introduces enhancements to the token counting functionalities within our chat models. The updates ensure that token counting reflects the entire context of a chat session,...
Hello, could you, please, tell me if it is possible to get the status response code in order to correctly handle the throttling exception.
Hi, how get tokenCount from this code $chat = $client->generativeModel(ModelName::GEMINI_PRO) ->startChat() ->withHistory($history); $response = $chat->sendMessage(new TextPart('in Go')); i need totalTokenCount from response, If i use request manual with guzzle, i...