Ai Agent – Telegram
146 subscribers
4 photos
5 files
6 links
اولین دوره مسابقات Ai Agent دانشگاه صنعتی اصفهان
👤: @AiAgent_Admin
Download Telegram
🍓3
Ai Agent
Location
📍 محل دقیق مسابقه
Please open Telegram to view this post
VIEW IN TELEGRAM
🍓6
🔴 توجه

امکان جایگزینی اعضای گروه, دیگر وجود ندارد.

💻 : @AiAgent_Admin
Please open Telegram to view this post
VIEW IN TELEGRAM
🍓3
یادآوری:

سه‌راهی برق رو فراموش نکنید.
🍓4🔥3
پذیرش با نیم ساعت تأخیر شروع می‌شود.
🍓5👍2
شرکت‌کننده‌های عزیز لطفاً برید دانشکده تا ۹:۳۰.
🍓5
پذیرش مسابقه از ساعت ۹:۴۵ شروع میشود
لطفا در اسرع وقت تشریف داشته باشید
🍓3
langchain
langchain-google-genai
tavily-python
openai
langchain-openai
langgraph
PyPDF2
pandas
tavily-python
🍓2🔥1
کتابخانه های سرور
🍓2
import requests
from openai import OpenAI

class Contest:
def __init__(self, api_token):
self.api_token = api_token
self.model = "gpt-4.1-mini"
self.client = OpenAI(api_key=self.api_token, base_url="https://api.metisai.ir/openai/v1")

def capture_the_flag(self, question):
response = self.client.chat.completions.create(
model=self.model,
messages=[{"role": "user", "content": f"calculate {question}. just print answer"}],
max_tokens=100,
temperature=0.1
)
return response.choices[0].message.content.strip()

if __name__ == __main__:
API_KEY="your api key here"
input_question=input()
solver=Contest(API_KEY)
result=solver.capture_the_flag(input_question)
print(result)
🍓21
import requests
import os
import re
from openai import OpenAI
from langgraph.prebuilt import create_react_agent


def request_url(url: str):
"""requests to the given URL and scrapes the HTML."""

scrape_request = requests.get(url, timeout=20)
if scrape_request.status_code == 200:
return scrape_request.text
return "Couldn't scrape the URL."

class Contest:
def __init__(self, api_token):
self.api_token = api_token
self.model = "gpt-4.1-mini"
self.client = OpenAI(api_key=self.api_token,
base_url="https://api.metisai.ir/openai/v1")
self.assistant = create_react_agent(
model="openai:gpt-4.1-mini",
tools=[request_url],
prompt="You are a helpful assistant who answers the users questions. Request to the API endpoint if the user requests and answer the user. You MUST write the final answer to the user's question in between brackets as short as possbile such as [12] or [south].",
)

def capture_the_flag(self, question):
response = self.assistant.invoke({"messages": {
"role": "user",
"content": question,
}})["messages"][-1].content.strip()
return re.findall(r'\[.+\]', response)[-1][1:-1]
🍓2
🍓2
Ai Agent
Location
لوکیشن اختتامیه
تالار فتوحی
ساعت ۳
🍓21
بچه‌ها لطفا زودتر تشریف بیارید برای اختتامیه
🍓2
اختتیامه تا پنج دقیقه دیگه شروع میشه
🍓2
Please open Telegram to view this post
VIEW IN TELEGRAM
🍓7👍2
🏆 اسامی تیم‌های برتر AiAgent:

🥇 Azc:
امین کافی
رسول کامکار
محمدرضا میردامادیان

🎓 از دانشگاه صنعتی اصفهان

🥈 Macaroni:
امیررضا چمی
مهدی سمسارزاده
محمدصالح مهدی‌نژاد

🎓 از دانشگاه اصفهان

🥉 Agent Arena:
متین اکبری
محمدمهدی حیدری
محمدرضا خاشعی

🎓 از دانشگاه صنعتی اصفهان

💻: @AiAgentChallenge
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
🔥15🍓1