Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aider code generation tool #38

Merged
merged 8 commits into from
Jun 7, 2024
Merged

Aider code generation tool #38

merged 8 commits into from
Jun 7, 2024

Conversation

BespalovSergey
Copy link
Collaborator

No description provided.

from aider.coders import Coder
from aider.models import Model
except ImportError:
ensure_module_is_installed("aider-chat", "poetry run pip install aider-chat")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why poetry here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, let's put this inside AiderTool init in case we want to import this module in some init.py

with_message (str):
"""

with_message: str = Field(description="instructions for code generate")
Copy link
Contributor

@whimo whimo Jun 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
with_message: str = Field(description="instructions for code generate")
with_message: str = Field(description="Instructions for code generation")



class AiderToolInput(BaseModel):
"""Input for the REPL tool.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"""Input for the REPL tool.
"""Input for the Aider tool.

return Tool.from_function(
func=coder.run,
name="aider tool",
description="Tool for generate programming code",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description="Tool for generate programming code",
description="Tool for code generation that has access to the provided repository. "
"Ask it to make changes in the code: fix bugs, add features, write tests etc. "
"It doesn't run the code by itself.",



def main():
crew = MotleyCrew(async_backend=AsyncBackend.THREADING)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove async backend here

@whimo whimo changed the title Add aider Aider code generation tool Jun 7, 2024
@whimo whimo merged commit e678da2 into main Jun 7, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants