Once again gojo's chatbot module upgrade to next level ๐ ๐ ๐ use gojo you can't refuse it
๐ Support you're GojO by adding to groups:
โ> https://t.me/GojoAssistantBot?startgroup
๐ Found any bugs?
Report: @NandhaSupport
@NandhaBots
โ> https://t.me/GojoAssistantBot?startgroup
๐ Found any bugs?
Report: @NandhaSupport
@NandhaBots
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
๐2
Nandha Bot's Channel
Photo
This feature swapped to /gojo /ask commands
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
Please open Telegram to view this post
VIEW IN TELEGRAM
๐2
๐3
This media is not supported in your browser
VIEW IN TELEGRAM
who won ? โ ๏ธ In by quantity we're small but by quality we're ...
Please open Telegram to view this post
VIEW IN TELEGRAM
โค1๐1
Forwarded from BotNews
Bot API 7.11
โข Bots can now participate in revenue sharing from Telegram Adsโญ๏ธ โ unlocking a new way to help support their development.
โข Introduced Paid Broadcastsโญ๏ธ โ allowing bots to broadcast up to 1000 messages per second.
โข Bots can now send and receive chat-specific hashtags that only show posts and stories from a specific chat when tapped.
โข Added a new inline button to let users copy text in one tap.
โข Bots can now add media to existing text messages.
โข And more, see the full changelog for details:
https://core.telegram.org/bots/api-changelog#october-31-2024
โ ๏ธ Warning: Starting December 1, 2024 messages with video posted in big communities can be delayed by the server until the respective video is reencoded. Read more here.
โข Bots can now participate in revenue sharing from Telegram Ads
โข Introduced Paid Broadcasts
โข Bots can now send and receive chat-specific hashtags that only show posts and stories from a specific chat when tapped.
โข Added a new inline button to let users copy text in one tap.
โข Bots can now add media to existing text messages.
โข And more, see the full changelog for details:
https://core.telegram.org/bots/api-changelog#october-31-2024
Please open Telegram to view this post
VIEW IN TELEGRAM
โค1
This media is not supported in your browser
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Nandha Bot's Channel
import requests
import json
token = ""
message_id = ...
chat_id = ...
url = f"https://api.telegram.org/bot{token}/editMessageMedia"
payload = {
"chat_id": chat_id,
"message_id": message_id,
"media": json.dumps({
"type": "photo",
"media": "" # file id or url
})
}
response = requests.post(url, data=payload)
print(response.json())
Satoru Gojo ("โง;โง(โง"โง
Message
It is little frustrating but we have shifted gojo to another AI. ๐
Please open Telegram to view this post
VIEW IN TELEGRAM
Satoru Gojo ("โง;โง(โง"โง
Message
Should we change back to our old AI version
Anonymous Poll
63%
Yes!
44%
The current version is reliable and "okay"
Added /pinterest and /pinvideo for pinterest search image & video plus downloads. #gojoAssistantBot
Example:
โ
Example:
/pinvideo gojo edits
/pinterest gojo profile
โ
pinterest video command updated
๐1
async def get_trendings(country: str):
base_url = "https://getdaytrends.com"
url = base_url + f'/{country}'
headers = {"user-agent": get_ua()}
# func for extract data from table
def get_result(data):
tags = data.table.find_all('tr')
results = []
for tr in tags:
src = tr.td
title = src.get_text()
link = base_url + src.a.get('href')
results.append({'title': title, 'url': link})
return results
async with aiohttp.ClientSession() as session:
try:
async with session.get(url, headers=headers) as response:
if response.status != 200:
return {'error': response.reason}
content = await response.text()
soup = BeautifulSoup(content, 'html.parser')
tables = soup.select("div[class^='inset']")
return {
'now_hashtags': get_result(tables[0]),
'today_hashtags': get_result(tables[1]),
'top_hashtags': get_result(tables[2])
}
except Exception as e:
return {'error': str(e)}
Scrapper for get top tweets tags that are trending now, today, and top in a country #NandhaBots
getdaytrends
Worldwide โข Now โข Twitter Trending Hashtags and Topics
HOT RIGHT NOW: #ุงูุฏูุชูุฑ_ูููุฏ_ุจู_ุณุงูู
_ุงูุนุฌู
ู, ใใใใใถใไฝๆ, #ใขใซในๆฐ่กฃ่ฃ
3Dใๆซ้ฒ็ฎ, #ฤฐmzalarHazฤฑrSaranHazฤฑr, #ไธ็ใใฌใผ... Explore all top Twitter trends and popular hashtags today Worldwide
๐1