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
# Create a question-answering chain using the index
98
+
99
+
context=""" You are Supersmart Github Repository AI system. You are a superintelligent AI that answers questions about Github Repositories and can understand the technical complexity if the repo.
100
+
101
+
You are:
102
+
- helpful & friendly
103
+
- good at answering complex questions in simple language
104
+
- an expert in all programming languages
105
+
- able to infer the intent of the user's question
106
+
107
+
108
+
Remember You are an inteelligent CSV Agent who can understand CSV files and their contents. You are given a CSV file with the following columns: Repository Name, Repository Link, Analysis. You are asked to find the most technically complex and challenging repository from the given CSV file.
109
+
110
+
To measure the technical complexity of a GitHub repository using the provided API endpoints, You will analyze various factors such as the number of commits, branches, pull requests, issues,contents , number of forks , stars , and contributors. Additionally, you will consider the programming languages used, the size of the codebase, and the frequency of updates.
111
+
You will Analyze the following GitHub repository factors to determine the technical complexity of the codebase and calculate a complexity score for each project:
112
+
113
+
1.Description
114
+
2.languages used in the repository
115
+
3.Number of stars
116
+
4.Number of forks
117
+
5.Labels of the repository
118
+
6.Description of the repository
119
+
7.Contents of the repository
120
+
121
+
You can consider other factors as well if you think they are relevant for determining the technical complexity of a GitHub repository.
122
+
Calculate the complexity score for each project by assigning weights to each factor and summing up the weighted scores.
123
+
124
+
The project with the highest complexity score will be considered the most technically complex.
125
+
126
+
Here is the approach or chain-of-thought process , you can use to reach to the solution :
127
+
Step 1: Analyze each row and it's contents in the CSV file , each Row represents a Github Repository
128
+
129
+
130
+
131
+
"""
132
+
133
+
prompt_template="""
134
+
135
+
Understand the following to answer the question in an efficient way
136
+
137
+
{context}
138
+
139
+
Question: {question}
140
+
Now answer the question. Let's think step by step:"""
Which is the most technically challenging repository from the given CSV file?
157
+
158
+
Return the name of the repository , the link to the repository and the analysis of the repository showing why it is the most technically challenging/Complex repository.Try to provide a detailed analysis to hold your answer strong
159
+
160
+
The output should be in the following format:
161
+
162
+
Repository Name: <name of the repository>
163
+
Repository Link: <link to the repository>
164
+
Analysis: <analysis of the repository>
165
+
166
+
Provide a clickable link to the repository as well like this:
167
+
To get the repo url , you can use this format :
168
+
169
+
The username is : "{username}"
170
+
171
+
172
+
"https://github.com/{username}/repository_name"
173
+
174
+
175
+
[Repository Name](Repository Link) --> This is Important.Don't skip it
176
+
177
+
178
+
Let's think step by step about how to answer this question:
st.sidebar.info("This Python-based tool , when given a GitHub user's URL, returns the most technically complex and challenging repository from that user's profile. The tool will use GPT and LangChain to assess each repository individually before determining the most technically challenging one.")
206
+
st.divider()
207
+
st.sidebar.write("This tool is created by [MANI KUMAR REDDY U](https/github.com/manikumarreddyu).")
208
+
209
+
# Display the repositories
210
+
ifsubmit_button:
211
+
st.subheader(f"Repositories for {username}")
212
+
repos=fetch_github_repos(username)
213
+
ifrepos:
214
+
display_repos(repos)
215
+
st.info("Analysis of the repositories using LangChain and ChatGPT started. Please wait...")
216
+
get_user_repos(username)
217
+
st.error("Invalid username or unable to fetch repositories")
0 commit comments