Hello everyone,
It seems that Google gemini-pro model is now available through API calls, I tried with a curl command to run their demo call and it worked just fine
curl \
-H 'Content-Type: application/json' \
-d '{"contents":[{"parts":[{"text":"Write a story about a magic backpack"}]}]}' \
-X POST https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent\?key\=API_CODE_HERE
I am wondering how we can call these through n8n would that be an HTTP request wi parameters to fit the gemini argument, do we have any plans to create nodes specifically for Gemini ?
The only frustrating thing is that Canada is not in the list of available regions so am not able to do that through the API, and my instance is hosted on a Canadian zone, is there any ‘vpn’ sort of trick I can use to make that node work ? please ?
I am sure we will add nodes for it at some point but for now if it is working with curl you should be able to make it work with the http request node with something like the below. It might be worth also adding a credential for the API key using a generic type but this should get you started, At the moment though this is not a service I can access as it is still region locked so I am not able to test it.
Hi @Rad@Jon great to see someone using gemini,
You have almost got it correct you have to add proxy if it doesn’t work in your region and moreover if you want you have harmful content etc parameters or temperature modified you can do that too.
Thank you so much @bharat_singh this isexactly what I tried indeed, my only issue is with the VPN, I use a service called bulletvpn, not sure how to provide the credentials to it though to be able to use one of the vpn servers
We of course wouldn’t recommend using a proxy or vpn to access a geolocked service as by using it you are going against the terms of service for that product.
This works with direct individual messages, but how would you handle memory or chat history without langchain or any of the existing AI nodes able to be used?
Currently individual messages would be much less useful I would think over having some sort of conversation history.