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

Add babyagi into agents #194

Closed
wants to merge 5 commits into from
Closed

Add babyagi into agents #194

wants to merge 5 commits into from

Conversation

hychen-naza
Copy link
Contributor

@hychen-naza hychen-naza commented Jul 2, 2023

Description

Add babyagi code under camel agents, and put its its example code and testing code in corresponding folders. It's my first commit, and I appreciate your feedback and suggestions to make my code better align with yours.

Babyagi Agent works by running an infinite loop that does the following steps:
1, Pulls the first task from the task list.
2, Sends the task to the execution agent, which uses OpenAI's API to complete the task based on the context.
3, Enriches the result and stores it in Chroma.
4, Creates new tasks and reprioritizes the task list based on the objective and the result of the previous task.

Compared to role-play, which has AI user and AI assistant, Babyagi Agent gives itself instructions through task creation and solve solutions by task execution.

Motivation and Context

Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
close #187

  • I have raised an issue to propose this change (required for new features and bug fixes)

Types of changes

What types of changes does your code introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds core functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (update in the documentation)
  • Example (update in the folder of example)

Checklist

Go over all the following points, and put an x in all the boxes that apply.
If you are unsure about any of these, don't hesitate to ask. We are here to help!

  • I have read the CONTRIBUTION guide. (required)
  • My change requires a change to the documentation.
  • I have updated the tests accordingly. (required for a bug fix or a new feature)
  • I have updated the documentation accordingly.

@hychen-naza hychen-naza changed the title Add babyagi into camel agents Add babyagi into agents Jul 2, 2023
@hychen-naza
Copy link
Contributor Author

Emmm, it seems like most checks are failed. Still working on it.

@lightaime
Copy link
Member

Thanks, @hychen-naza for the PR. No worries. We will take a look at it soon.

@Obs01ete
Copy link
Collaborator

Obs01ete commented Jul 3, 2023

Thanks for the MR. For those who is not familiar with this paper, please put 2-3 sentenses of description of what BabyAGI is and how it is different from RolePlaying.

@lightaime
Copy link
Member

Thanks for the MR. For those who is not familiar with this paper, please put 2-3 sentenses of description of what BabyAGI is and how it is different from RolePlaying.

Here is a writeup from the authors: https://yoheinakajima.com/task-driven-autonomous-agent-utilizing-gpt-4-pinecone-and-langchain-for-diverse-applications/.

@hychen-naza
Copy link
Contributor Author

hychen-naza commented Jul 4, 2023

Hi, thanks for your review and comments.

Babyagi Agent is explained at the description of this PR. Also, I have updated the Babyagi Agent to make it inherit from Base Agent, according to #198 (comment).

A few questions about the MR check failures:
1, Pytest check failures: I used a new package chromadb to store tasks results in user's local ChromaDB, and this package is missing in the master. Can we add this package to the master? Or change the code to avoid using chromadb?
2, Doc check failures: I can build the documentations successfully in my local (following https://github.com/camel-ai/camel/tree/llm_agents_hy/docs), but I have no idea why it fails when merging to master.

@hychen-naza hychen-naza self-assigned this Jul 4, 2023
@Obs01ete
Copy link
Collaborator

Obs01ete commented Jul 6, 2023

Thanks for the overview of BabyAGI in the description. This is really helpful.
Regarding dependencies, you need to add them to pyproject.toml poetry section.

@lightaime what about the binary blobs. We should not add them to the repo.

@hychen-naza Is there a way to not add parquet and other binary stuff to the repo: create them or download?

@Benjamin-eecs
Copy link
Member

2, Doc check failures: I can build the documentations successfully in my local (following llm_agents_hy/docs), but I have no idea why it fails when merging to master.

@lightaime @Obs01ete Mind taking a look to see what's wrong, the docs github action failed is really weird to me

@hychen-naza
Copy link
Contributor Author

hychen-naza commented Jul 7, 2023

Thanks guys. I created a new branch and PR for debugging, #210
It went through the doc check and dependency checks, even though it failed in mypy check. I will look into that tomorrow and move everything to that branch, and may close this PR later.
We are all good for now.

@hychen-naza hychen-naza deleted the llm_agents_hy branch August 6, 2023 18:57
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.

[Feature Request] OpenAI function call
4 participants