Spaces:
Sleeping
Sleeping
Neodpy
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,12 +15,14 @@ def generate_docs(repo_id: str) -> str:
|
|
| 15 |
|
| 16 |
repo_data = response.json()
|
| 17 |
repo_description = repo_data.get("description", "No description provided.")
|
|
|
|
|
|
|
| 18 |
repo_name = repo_data.get("name", repo_id)
|
| 19 |
|
| 20 |
# Construct a prompt that includes some of the repository details.
|
| 21 |
prompt = (
|
| 22 |
f"Generate comprehensive documentation for the GitHub repository '{repo_id}'. "
|
| 23 |
-
f"The repository is named '{repo_name}' and its description is: {repo_description}.\n\n"
|
| 24 |
"Please include sections such as an introduction, installation instructions, usage examples, "
|
| 25 |
"and any relevant details that would help a new user understand and work with this repository."
|
| 26 |
)
|
|
|
|
| 15 |
|
| 16 |
repo_data = response.json()
|
| 17 |
repo_description = repo_data.get("description", "No description provided.")
|
| 18 |
+
readme = repo_data.get("README.md", "No description provided.")
|
| 19 |
+
|
| 20 |
repo_name = repo_data.get("name", repo_id)
|
| 21 |
|
| 22 |
# Construct a prompt that includes some of the repository details.
|
| 23 |
prompt = (
|
| 24 |
f"Generate comprehensive documentation for the GitHub repository '{repo_id}'. "
|
| 25 |
+
f"The repository is named '{repo_name}' and its description is: {repo_description}, you should use {readme} for the base docs.\n\n"
|
| 26 |
"Please include sections such as an introduction, installation instructions, usage examples, "
|
| 27 |
"and any relevant details that would help a new user understand and work with this repository."
|
| 28 |
)
|