autogen icon indicating copy to clipboard operation
autogen copied to clipboard

no change I also revised the roles to ensure no redundancy "-issue was closed with no clear solution"

Open Nbtguyoriginal opened this issue 3 years ago • 7 comments

          no change i also revised the roles to ensure no redundancy 

-same error as before tried changing seeds adjusting the instructions what should i do next ?

gpt4_config = {
    "seed": 3,
    "max_retry_period": 1000,
    "temperature": 0.3,
    "config_list": config_list,
    "timeout": 400  # default to 60 seconds, but can be adjusted as needed
}


gpt4_config2 = {
    "seed": 4,
    "max_retry_period": 1000,
    "temperature": 0,
    "config_list": config_list2,
    "timeout": 400  # default to 60 seconds, but can be adjusted as needed
}

gpt4_config = {
    "seed": 3,
    "max_retry_period": 1000,
    "temperature": 0.3,
    "config_list": config_list,
    "timeout": 400  # default to 60 seconds, but can be adjusted as needed
}


gpt4_config2 = {
    "seed": 4,
    "max_retry_period": 1000,
    "temperature": 0,
    "config_list": config_list2,
    "timeout": 400  # default to 60 seconds, but can be adjusted as needed
}

# Create a UserProxyAgent instance named "user_proxy"
user_proxy = autogen.UserProxyAgent(
    name="Developer",
    human_input_mode="NEVER",
    max_consecutive_auto_reply=50,
    is_termination_msg=lambda x: x.get("content", "").rstrip().endswith("TERMINATE"),
    code_execution_config={
        "work_dir": "coding",
        "use_docker": False,
    }
)

# Define each role
project_manager = autogen.AssistantAgent(
    name="project_manager",
    llm_config=gpt4_config2,
    system_message="""Oversees the entire project, ensures tasks are completed and delivered quickly, manages risks, and communicates with other members of the conversation. Ensures that the project aligns with the goal of creating a secure messaging platform using Discord webhooks. When asked a question will always attempt to answer them to drive the project to completion."""
)

python_lead_developer = autogen.AssistantAgent(
    name="python_lead_developer",
    llm_config=gpt4_config2,
    system_message="Leads the Python development team and oversees the main compilation of the final product. Makes key architectural decisions and ensures the development aligns with the project's goals. Collaborates closely with the Python Expert to review and refine the codebase, ensuring its correctness and quality. Together, they address any discrepancies or issues in the Python code before finalization.",
)

python_expert = autogen.AssistantAgent(
    name="python_expert",
    llm_config=gpt4_config,
    system_message="Offers deep expertise in Python programming. Collaborates with the Python Lead Developer to review and refine the codebase. Advises on best practices related to code creation, code optimizations, and advanced Python techniques. Assists in integrating Discord webhooks and developing the local program for data transportation.",
)

frontend_developer = autogen.AssistantAgent(
    name="frontend_developer",
    llm_config=gpt4_config,
    system_message="Designs and implements the user interface for both user and admin pages. Ensures seamless integration with the backend and a responsive design for various devices.",
)

Backend_developer = autogen.AssistantAgent(
    name="Backend_developer",
    llm_config=gpt4_config,
    system_message="Responsible for server-side application logic and integration of the work front-end developers do. Designs and implements APIs, database architecture, and ensures performance and reliability of the server-side of the application.",
)

database_administrator = autogen.AssistantAgent(
    name="database_administrator",
    llm_config=gpt4_config2,
    system_message="Sets up and maintains the database for user data and chat logs. Implements efficient retrieval mechanisms and ensures data integrity and security.",
)

security_expert = autogen.AssistantAgent(
    name="security_expert",
    llm_config=gpt4_config,
    system_message="Ensures end-to-end security of the application. Implements authentication and authorization mechanisms, monitors webhook security,",
)

Front_end_security_expert = autogen.AssistantAgent(
    name="Front_end_security_expert",
    llm_config=gpt4_config,
    system_message="Ensures front end security of the application. by conducting detailed tests on the functionality of the front end user entry points",
)

qa_tester = autogen.AssistantAgent(
    name="qa_tester",
    llm_config=gpt4_config,
    system_message="Conducts thorough testing of the application and features, focusing on functionality, security, and user experience. Collaborates with developers to address identified issues.",
)

devops_engineer = autogen.AssistantAgent(
    name="devops_engineer",
    llm_config=gpt4_config2,
    system_message="Manages the deployment pipeline, ensures smooth CI/CD processes, and sets up the necessary infrastructure for scalability and reliability.",
)

researcher = autogen.AssistantAgent(
    name="researcher",
    llm_config=gpt4_config,
    system_message="Explores new methods or technologies that can enhance the platform. Assists in understanding the potential of Discord webhooks how to use them and sophisticated examples of applications and use cases as well as recommends improvements. to overall code functionality.",
)

documentation_writer = autogen.AssistantAgent(
    name="documentation_writer",
    llm_config=gpt4_config,
    system_message="Creates comprehensive user manuals, API documentation, and internal documentation to guide both end-users and developers. The documents should be well organized and comprehensive in explaining its subject",
)

planner = autogen.AssistantAgent(
    name="planner",
    llm_config=gpt4_config,
    system_message="Collaborates with the Project Manager to break down tasks into their subsidiary parts, set milestones and deadlines for when problems should be solved by suggesting the order of completion, helps with and manages allocating resources efficiently.",
)

product_manager = autogen.AssistantAgent(
    name="product_manager",
    llm_config=gpt4_config,
    system_message="Aligns the product with market needs, sets the product number id throughout development, gathers feedback, and ensures the platform meets user expectations. and meets all requirements for deployment ",
)

ui_ux_designer = autogen.AssistantAgent(
    name="ui_ux_designer",
    llm_config=gpt4_config2,
    system_message="Designs intuitive and aesthetically pleasing interfaces. Focuses on user experience, ensuring easy navigation and a cohesive design language and appealing colors throughout with detailed animations.",
)

network_engineer = autogen.AssistantAgent(
    name="network_engineer",
    llm_config=gpt4_config,
    system_message="Ensures robust and secure application free of known and potential vulnerabilities.",
)

human_resources = autogen.AssistantAgent(
    name="human_resources",
    llm_config=gpt4_config,
    system_message="Oversees team well-being, manages hiring and onboarding, ensures a positive work environment, and addresses any personnel-related concerns pushes each member to do their very best in a positive manner.",
)

training_development = autogen.AssistantAgent(
    name="training_development",
    llm_config=gpt4_config,
    system_message="Ensures the team is up-to-date with the latest technologies and best practices. Provides training sessions and continuous learning opportunities.",
)

critic = autogen.AssistantAgent(
    name="critic",
    system_message="""Critic. You are a helpful assistant highly skilled in evaluating the quality of a given ideas of code by providing a score from 1 (bad) - 10 (good) while providing clear rationale. YOU MUST CONSIDER VISUALIZATION BEST PRACTICES for each evaluation. Specifically, you can carefully evaluate the code across the following dimensions
- bugs (bugs):  are there bugs, logic errors, syntax error or typos? Are there any reasons why the code may fail to compile? How should it be fixed? If ANY bug exists, the bug score MUST be less than 5.
- Data transformation (transformation): Is the data transformed appropriately for the visualization type? E.g., is the dataset appropriated filtered, aggregated, or grouped  if needed? If a date field is used, is the date field first converted to a date object etc?
- Goal compliance (compliance): how well the code meets the specified visualization goals?
- Visualization type (type): CONSIDERING BEST PRACTICES, is the visualization type appropriate for the data and intent? Is there a visualization type that would be more effective in conveying insights? If a different visualization type is more appropriate, the score MUST BE LESS THAN 5.
- Data encoding (encoding): Is the data encoded appropriately for the visualization type?
- aesthetics (aesthetics): Are the aesthetics of the visualization appropriate for the visualization type and the data?
- if no code is provide you are to create a skeleton code base of what should have been propvided otherwise your main tasks of evaluation of ideals and code itself

YOU MUST PROVIDE A SCORE for each of the above dimensions. if appicable otherwise return the needed skeleton code and instructions
{bugs: 0, transformation: 0, compliance: 0, type: 0, encoding: 0, aesthetics: 0}
Do not suggest code. if its already provided  
Finally, based on the critique above, suggest a concrete list of actions that the coder should take to improve the code.
""",
    llm_config=gpt4_config2,
)

groupChat = autogen.GroupChat(
    agents=[
        user_proxy, project_manager, python_lead_developer, python_expert, frontend_developer, 
        Backend_developer, database_administrator, security_expert, Front_end_security_expert, 
        qa_tester, devops_engineer, researcher, documentation_writer, planner, product_manager, 
        ui_ux_designer, network_engineer, human_resources, training_development, critic
    ], 
    messages=[], 
    max_round=10
)

manager = autogen.GroupChatManager(groupchat=groupChat, llm_config=gpt4_config)

Originally posted by @Nbtguyoriginal in https://github.com/microsoft/autogen/issues/411#issuecomment-1780139613

Nbtguyoriginal avatar Oct 25 '23 22:10 Nbtguyoriginal

@afourney @pcdeadeasy

gagb avatar Oct 25 '23 22:10 gagb

@Nbtguyoriginal I see you have about 20 agents in your group chat. I am not sure I remember the error you get. Could you start simple and see if you can get the notebook/agentchat_groupchat.ipynb notebook working. Let me know if you encounter any issues there.

pcdeadeasy avatar Oct 26 '23 00:10 pcdeadeasy

after reviewing the listed file https://github.com/microsoft/autogen/issues/432#issuecomment-1780246010 and your advise I've made more progress it seems it come down to the structure of the agents their defined roles and the required task some combinations of these factors caused a timeout errors from open ai potentially stemming from token combining in the instruction set

ty for all help

Nbtguyoriginal avatar Oct 26 '23 04:10 Nbtguyoriginal

Good to hear about your progress and thanks for updating us.

pcdeadeasy avatar Oct 26 '23 04:10 pcdeadeasy

awesome team glad I heard about the project I'm working on an agent generator hopefully it ends up being useful for the overall project

Nbtguyoriginal avatar Oct 26 '23 04:10 Nbtguyoriginal

Please use our discord channel to update us on your work with the agent generator. We’ll be introducing new samples over the next few weeks.

pcdeadeasy avatar Oct 26 '23 04:10 pcdeadeasy

@Nbtguyoriginal please consider closing this issue if your question was addressed.

gagb avatar Oct 26 '23 19:10 gagb