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

LLM dialog support to add a github repo #1

Open
xihajun opened this issue Dec 14, 2024 · 0 comments
Open

LLM dialog support to add a github repo #1

xihajun opened this issue Dec 14, 2024 · 0 comments

Comments

@xihajun
Copy link
Owner

xihajun commented Dec 14, 2024

agent = Agent("model_name", enable_memory = True)
agent.add_repo("url") # it will add the repo to the system prompt

agent.add_message("user", "Issue: xxx help me to solve it")
response = agent.generate_response()
xihajun added a commit that referenced this issue Dec 14, 2024
Related to #1

Add support for adding a GitHub repository to the `Agent` class.

* Add `add_repo` method to the `Agent` class in `llm_dialog_manager/agent.py` to update the `system_prompt` attribute with the provided repository URL.
* Update the `__init__` method of the `Agent` class to include the `repo_content` attribute.
* Add logic to `add_repo` method to accept username and repository name as input.
* Save repository content as a buffer and update it.
* Add repository content to the user message and empty the buffer using `self.repo_content.pop()`.

* Add tests for the `add_repo` method in `tests/test_agent.py`.
  * Test `add_repo` method with direct repository URL.
  * Test `add_repo` method with username and repository name.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/xihajun/llm_dialog_manager/issues/1?shareId=XXXX-XXXX-XXXX-XXXX).
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

No branches or pull requests

1 participant