Today’s Gemini release is accompanied by Python and Go SDKs. However numerous applications out there, such as web clients, are on a nodejs / typescript stack.
Any information on when the API reference will be updated with the information on how to leverage the new capabilities?
Is a typescript SDK coming as well? Not a priority, the API changes (tools, multimodal generation, etc.) are more important.
I’ve been told that the Node library is in progress, but nobody could give me a date.
My tests so far have been that existing libraries work with the conversational parts, but I haven’t exhaustively tested it. Tools are the same, I’m pretty sure, for example.
The BiDirectional Stream will be with Websockets and will be new.
In the meantime, there is some documentation in the cookbook.
I have the same question/issue. I have a production app which is working correctly with Gemini-1.5, but with Gemini-2.0-flash it gives a response as if it didn’t get all of the info I sent to the model. I am sending scripts for automated code conversion and now I get the error “Please provide the code” - however I already sent the code via the REST API along with my prompt. So it seems that the API has changed - but i don’t know what the exact changes are. So if someone from Google can respond that would be helpful.
The new SDK is available in Python and Go.
Current status on other SDKs are that Java and JavaScript are coming soon.
The team is aware of the different implementations that 1.5 is used in. Gemini 2.0 has just been released and is in experimental phase, should new features and SDKs be added, this will be announced when available.
As mentioned, currently we can experiment with the cookbook and dev doc
The REST API and the implementation in every SDK is based on the information provided by the Discovery API. You could query it for Generative Language to get the latest information about the request/response types and their parameters.
I regularly use the following request to track and diff changes of the Gemini API and apply them to my Gemini SDK for .NET.
#@apiKey={{$dotenv GOOGLE_API_KEY}}
# Get the Google AI REST API description from the discovery endpoint.
GET https://generativelanguage.googleapis.com/$discovery/rest?version=v1beta&key={{apiKey}}
As for the streamlining/bidirectional API, you can’t use REST for that as you need to maintain a socket. The websockets examples should point you in the right direction.