OpenAGI 0.2.7 Release

OpenAGI 0.2.7 Release

Jul 15, 2024

Jul 15, 2024

We are excited to announce a improved feature in OpenAGI: Human intervention in the Task Planner. This enhancement allows the admin to interact with the system by asking questions and gathering necessary information during task planning. With this feature, you can ensure more accurate and customized task outcomes, particularly useful for complex tasks requiring specific input from users.

Key Highlights of the Latest Release

  • More Tools: New tools such as Tavily QA Search, Exa Search, and YouTube Search have been integrated, enhancing the system’s capability to fetch relevant information from a variety of sources.

  • Human Intervention: A significant enhancement allows admins to interactively ask questions and gather information during task planning, ensuring tasks are well decomposed.

  • Anthropic LLM Support: Integration with Anthropic’s latest model i.e., Claude 3.5 Sonnet brings even greater flexibility and performance to OpenAGI.

These key updates make OpenAGI more versatile, accurate, and adaptable for various complex and dynamic tasks.

How does Human Intervention Work ?

When you enable human intervention, the task planner will periodically prompt you for information needed to proceed with the tasks. This interactive approach ensures that the system has all the necessary details to execute tasks effectively.

Here is a code example demonstrating how to use this new feature:

1. Importing Required Libraries and Modules


2. Setting Up Azure Environment Variables

if __name__ == "__main__":
    import os
    
    # Set Azure environment variables
os.environ["AZURE_BASE_URL"] = "https://<replace-with-your-endpoint>.openai.azure.com/"
os.environ["AZURE_DEPLOYMENT_NAME"] = "<replace-with-your-deployment-name>"
os.environ["AZURE_MODEL_NAME"] = "gpt4-32k"
os.environ["AZURE_OPENAI_API_VERSION"] = "2023-05-15"
os.environ["AZURE_OPENAI_API_KEY"] = "<replace-with-your-key>

These environment variables configure the Azure OpenAI service with necessary parameters such as base URL, deployment name, model name, API version, and API key.

3. Loading Azure ChatOpenAIModel Configuration


This code snippet loads the Azure ChatOpenAI model configuration from the environment variables and initializes the model.

4. Defining Worker Roles


  • feedback_collector: This worker collects customer feedback from various online sources.

  • data_analyst: This worker analyzes the collected feedback to identify trends and sentiments.

  • report_creator: This worker compiles the analyzed data into a comprehensive report.

Each worker is assigned specific actions they can perform, such as searching with DuckDuckGo, loading web content, reading, and writing files.

5. Setting Up the Admin with Human Intervention


  • admin: This instance of the Admin class is configured to allow human intervention in the task planner. It manages the overall workflow and assigns tasks to the workers.

  • human_intervene=True: Enables human intervention, allowing the admin to ask questions and gather additional information during task execution.

6. Running the Admin Task with Human Intervention


The admin is given a task to create a customer feedback analysis report for AirPods Pro. The query and description provide context and detailed instructions for the task.

7. Displaying the Result


The final result of the task is printed and formatted using the rich library's markdown capabilities.

Example Interaction with Human Intervention

When the script is run, the admin will prompt the user for additional details to ensure the task is completed accurately:


This interaction ensures that the admin has all the necessary information to complete the task accurately, demonstrating the utility of the human intervention feature.

Use Cases for OpenAGI with Human Intervention

OpenAGI’s latest feature allowing human intervention during task planning enhances its utility for various complex tasks. Here are some practical use cases where human inputs can significantly improve outcomes:

1. Customer Feedback Analysis:

  • Collect feedback from specific online sources and clarify which themes to focus on, such as product quality or user experience.

2. Market Research:

  • Conduct detailed market analysis with human inputs on target demographics and competitor products.

3. Content Creation:

  • Generate articles or blog posts where users specify themes, tone, and key points to cover.

4. Project Management:

  • Organize and manage projects with dynamic inputs on task priorities and deadlines.

5. Technical Support:

  • Provide technical assistance with user-specific questions to diagnose and troubleshoot issues accurately.

6. Event Planning:

  • Plan events by gathering specific details about venue, attendees, and schedule preferences.

7. Financial Analysis:

  • Perform financial assessments with human inputs on specific metrics and financial models to use.

Conclusion

This new feature enhances the flexibility and accuracy of the OpenAGI framework, making it a powerful tool for complex and dynamic task management. By incorporating human intervention, you can ensure tasks are executed with the most relevant and precise information, leading to better outcomes and more efficient workflows.

Dive into OpenAGI:

Eager to explore OpenAGI and embark on your own journey of discovery?

  • Explore the GitHub repo here:

https://github.com/aiplanethub/openagi

  • Our documentation:

https://openagi.aiplanet.com/

Also, feel free to open issues, make pull requests to contribute, and don’t forget to ⭐️ the repo to stay updated with the latest developments.