You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# AI agent powered by PraisonAI and OpenAI to analyze GitHub repositories using GitHub API.
11
+
12
+
# [](https://colab.research.google.com/github/DhivyaBharathy-web/PraisonAI/blob/main/examples/cookbooks/github_repo_analyzer_agent.ipynb)
13
+
14
+
# # 📦 Install dependencies
15
+
# """
16
+
17
+
# !pip install praisonaiagents openai requests
18
+
19
+
# """# Tools Used
20
+
21
+
# 🧠 praisonaiagents – Smart AI agent
22
+
23
+
# 🔗 openai – GPT-powered responses
24
+
25
+
# 📂 requests – GitHub repo analysis
26
+
27
+
# 🖥️ Python I/O – Interactive CLI in notebook
28
+
29
+
# # 🔐 Set OpenAI API Key
30
+
# """
31
+
32
+
importos
33
+
ifnotos.getenv("OPENAI_API_KEY"):
34
+
os.environ["OPENAI_API_KEY"] =input("🔐 Enter your OpenAI API key: ")
35
+
36
+
# """# 🧠 Imports"""
37
+
38
+
importrequests
39
+
importopenai
40
+
frompraisonaiagentsimportAgent
41
+
42
+
openai.api_key=os.environ["OPENAI_API_KEY"]
43
+
44
+
# """# 🤖 Create the Agent"""
45
+
46
+
agent=Agent(instructions="""
47
+
You are a GitHub codebase explainer. When given a repo URL, fetch summary of
48
+
its files and provide insightful analysis. Be helpful and concise.
0 commit comments