Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# README.md for CodeLLAMA

This repository contains the source code for the CodeLLAMA project, which is a web application that uses the Hono framework to interact with GitHub repositories and retrieve information about them. The application exposes several endpoints for interacting with GitHub repositories, including:

* `/summarize_codebase`: Returns a summary of the codebase for a given GitHub repository. The summary includes information about the repository's size, commit history, and the number of files and folders.
* `/readme_ify`: Returns a README.md file for a given GitHub repository. The README.md file is generated using the Perplexity API and is created based on the repository's commit history and file structure.
* `/file_summary`: Returns a summary of a specific file in a GitHub repository. The summary includes information about the file's contents and the number of lines of code.
* `/list_files`: Returns a list of all the files in a GitHub repository. The list includes the names of the files, their extensions, and the folders in which they are located.
* `/get_tree`: Returns the contents of a folder in a GitHub repository. The contents include the names of the files and subfolders, as well as the folder names and their parent folders.

The application also defines a `route` variable that is used to store the current endpoint being accessed. This variable is used to determine which endpoint the user is currently accessing.

The application uses the Hono framework to handle HTTP requests and responses, and it interacts with the GitHub API to retrieve information about the repositories. The application also uses the Perplexity API to generate the README.md files.

The source code is organized into several files, including:

* `src/helpers/githubApiHandler.js`: Defines an asynchronous function called `getRepoContents` that uses the `fetch` API to retrieve the contents of a repository from GitHub.
* `src/helpers/githubTreeHandler.js`: Defines a function called `getLatestCommitSha` that retrieves the latest commit SHA for a given repository, and a function called `getTreeContents` that retrieves the tree for a given repository and commit SHA.
* `src/helpers/perplexityApiHandler.js`: Defines a function called `getLlmResponses` that uses the Perplexity API to generate responses for a given repository.
* `src/index.js`: Defines the web application using the Hono framework, and maps the endpoints to the corresponding functions.

Overall, this project demonstrates how to interact with the GitHub API and the Perplexity API using JavaScript, and how to build a web application using the Hono framework

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages