AutoCoder is an experimental description-to-pull-request agent that leverages the power of LLM, ActionWeaver for function calling & orchestration, LLamaIndex for Retrieval-Augmented Generation (RAG), Langchain community and Langsmith for observability.
Please note that this demo app is not intended for production use. This bot is only looking at python files at the moment.
All examples are executed using the Azure gpt-4-32k model
Prompt: [Code Change] Enhance the 'Example Pull Requests' section in the README.md to be more detailed and descriptive. (PR, LangSmith traces)
Prompt: [Code Change] Update the codebase to use OpenAI instead of AzureOpenAI client. (PR, LangSmith traces)
Prompt: [Code Change] Move all classes from autocoder/pydantic_models/file_ops.py into separate files, one for each class. Remove the code in original file. (PR, LangSmith traces)
Prompt: [Code Change] Implement all TODO items in autocoder/codebase.py PR, LangSmith traces
Prompt:
[Code Change] rename every github_api
variable to langchain_github_api
within the codebase. Do not remove anything else.
(PR, LangSmith traces)
Prompt: [Code Change] add structure logging into autocoder/index.py and configure it to log the output to a file. (PR, LangSmith traces)
Prompt: [Code Change] Optimize the code in autocoder/telemetry.py
- refactor identity_decorator to be more compact
- remove redundant code in traceable and trace_client (PR, LangSmith traces)
AutoCoder is capable of following tasks:
- GetIssues
- Description: Fetches a list of issues from the GitHub repository.
- Example Question: "Give me all active issues."
- QuestionAnswer
- Description: Answers questions about the codebase.
- Example Question: "How is the AutoCoder class implemented?"
- CreatePullRequest
- Description: Creates a new Pull Request in a Git repository.
- Example Question: "Create a PR."
- PlanAndImplementCodeChange
- Description: Plans and implements code changes based on a given description.
- Example Question: "Update the
autocoder/bot.py
to use AzureOpenAI instead of OpenAI."
- Follow the instructions on creating a GitHub App on GitHub's documentation.
- Grant the Autocoder app Read and Write access in GitHub App settings. It should have access to administration, code, discussions, issues, pull requests, and repository projects for the intended repository.
- GitHub API Access: Set
GITHUB_APP_ID
andGITHUB_APP_PRIVATE_KEY
. - OpenAI Access: Set
OPENAI_API_KEY
and specify the model inMODEL
, e.g.,MODEL=gpt-4-0613
. OrAZURE_OPENAI_KEY
andAZURE_OPENAI_ENDPOINT
if using Azure OpenAI service. - Langchain Monitoring (Optional): Set
LANGCHAIN_API_KEY
.
- Precision in Requests: When requesting the bot to perform tasks, be precise with file paths and provide detailed, descriptive information instead of one-liner.
- Handling Partial Implementations: The bot may occasionally insert comments such as "to-be-implemented" rather than fully writing out the code. In such cases, you can guide the bot towards the desired outcome through multiple rounds of conversation.
We welcome contributions from the open-source community.
Apache License 2.0