A new image generation model
and added google AI ( Gemini with support image/sticker since gojo AI can't analyse face's ( so for the alternative ) we owe Gemini!
By @Nandhabots Company!
Tags:
#gojoai #draw #gemini
/bdraw your promptand added google AI ( Gemini with support image/sticker since gojo AI can't analyse face's ( so for the alternative ) we owe Gemini!
/google queryBy @Nandhabots Company!
Tags:
#gojoai #draw #gemini
👍1
import aiohttp
class Gemini:
def __init__(self, api_key: str):
self.api_key = api_key
async def ask(self, prompt: str, file: dict = {}) -> dict:
async with aiohttp.ClientSession() as session:
payload = {}
payload["contents"] = []
if file:
file_uri = file["file"]["uri"]
payload["contents"].append(
{
"role": "user",
"parts": [
{
"fileData": {
"fileUri": file_uri,
"mimeType": "image/jpeg"
}
},
{
"text": prompt
}
]
}
)
else:
payload["contents"].append(
{
"role": "user",
"parts": [
{
"text": prompt
}
]
}
)
payload["generationConfig"] = {
"temperature": 0.9,
"topK": 40,
"topP": 0.95,
"maxOutputTokens": 1024,
"responseMimeType": "text/plain"
}
async with session.post(f"https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash-8b-exp-0924:generateContent?key={self.api_key}", headers={"Content-Type": "application/json"}, json=payload) as response:
try:
results = await response.json()
return results
except Exception as e:
return {"error": str(e)}
async def upload_image(self, path: str) -> dict:
with open(path, "rb") as file:
async with aiohttp.ClientSession() as session:
payload = {"file": file}
async with session.post(f"https://generativelanguage.googleapis.com/upload/v1beta/files?key={self.api_key}", data=payload) as response:
try:
return await response.json()
except Exception as e:
return {"error": str(e)}
os.remove(path)
⚔️ Get your API key:
https://aistudio.google.com/app/apikey
Use @GojoAssistantBot /gemini or /google cmd replaced old model with official api
#gojoai #gemini #gojoassistant
@NandhaBots
Please open Telegram to view this post
VIEW IN TELEGRAM
👍1
🛫 13 Powerful AI Tools You Should Know
1. Claude.ai — solve any problem
2. PicWish.com — remove backgrounds
3. Perplexity.ai — research anything
4. Suno.ai — compose music
5. Canva.com — design graphics
6. ElevenLabs.io — clone voices
7. Grammarly.com — perfect writing
8. Luma.ai — create videos
9. RecCloud.com — summarize YouTube
10. Runway.ml — edit videos
11. Descript.com — edit podcasts
12. Syllaby.io — create faceless videos
13. skysnail.io — create viral thumbnails
Save this list — it could be incredibly helpful later. 📌
#AITools #Claude #Perplexity #ChatGPT #Gemini
These tools can help you work smarter, create faster, and save a lot of time — whether you’re designing, researching, editing, writing, or creating content.
1. Claude.ai — solve any problem
2. PicWish.com — remove backgrounds
3. Perplexity.ai — research anything
4. Suno.ai — compose music
5. Canva.com — design graphics
6. ElevenLabs.io — clone voices
7. Grammarly.com — perfect writing
8. Luma.ai — create videos
9. RecCloud.com — summarize YouTube
10. Runway.ml — edit videos
11. Descript.com — edit podcasts
12. Syllaby.io — create faceless videos
13. skysnail.io — create viral thumbnails
Save this list — it could be incredibly helpful later. 📌
👍2