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

[Bug]: CodeActAgent awaits user input after each step #1780

Open
2 tasks done
neubig opened this issue May 14, 2024 · 4 comments
Open
2 tasks done

[Bug]: CodeActAgent awaits user input after each step #1780

neubig opened this issue May 14, 2024 · 4 comments
Labels
bug Something isn't working severity:medium Problems that affect many users

Comments

@neubig
Copy link
Contributor

neubig commented May 14, 2024

Is there an existing issue for the same bug?

Describe the bug

Currently, with the most recent master version, the agent seems to await user input after each step. Here is an example screenshot:

Screenshot 2024-05-14 at 8 30 45 AM

Current Version

commit 3d53d363b4416b05046dd390ca37d5745defce5a (origin/main, origin/HEAD, neubig/main, main)
Author: Boxuan Li <liboxuan@connect.hku.hk>
Date:   Tue May 14 00:50:29 2024 -0700

Installation and Configuration

`make build; make run`

Model and Agent

  • Model: GPT-4
  • Agent: CodeAct

Reproduction Steps

No response

Logs, Errors, Screenshots, and Additional Context

In the logs, after every step I see:

08:30:01 - opendevin:INFO: agent_controller.py:189 - Setting agent(CodeActAgent) state from AgentState.RUNNING to AgentState.AWAITING_USER_INPUT

For instance, here is the first action:

08:56:13 - opendevin:INFO: codeact_agent.py:279 - Cost: 0.02 USD | Accumulated Cost: 0.02 USD
08:56:13 - ACTION
MessageAction(content="Let's start by cloning the repository and creating a new branch. I'll proceed with these steps first.", wait_for_response=True, action='message')
08:56:13 - opendevin:INFO: agent_controller.py:182 - Setting agent(CodeActAgent) state from AgentState.RUNNING to AgentState.AWAITING_USER_INPUT
@neubig neubig added the bug Something isn't working label May 14, 2024
@neubig neubig changed the title [Bug]: Agent awaits user input after each step [Bug]: CodeActAgent awaits user input after each step May 14, 2024
@SmartManoj
Copy link
Collaborator

SmartManoj commented May 14, 2024

add "Don't give me intermediate steps" to the task

# We assume the LLM is GOOD enough that when it returns pure natural language
# it want to talk to the user
return MessageAction(content=action_str, wait_for_response=True)

Should get wait_for_response value from LLM

@rbren rbren added the severity:medium Problems that affect many users label May 14, 2024
@assertion
Copy link
Contributor

assertion commented May 15, 2024

I'm not sure whether we can make CodeActAgent do like this : #1777

Let llm to choose whether continue executing or ask for user input ? @neubig

cc @xingyaoww @rbren

@xingyaoww
Copy link
Collaborator

@assertion Based on my understanding of the solution in #1777, you are forcing the model to predict the argument of True vs. False and parse it to decide whether to ask for user input?

I think that eventually comes down to whether the LLM can choose between acting and asking for input. For GPT-4, this is probably not a problem - even if you don't force the model to generate arguments, they can still perform tasks autonomously vs. asking humans.

If you instruct a weaker model to do so, I think they will struggle with this nevertheless -- even if you force them to generate these "ask user input = True vs. False", plus we have to deal with parsing for this, which is kinda undesirable :(

I think we can probably address this by introducing the full-autonomous mode: #1798

@SmartManoj
Copy link
Collaborator

@neubig Which version of GPT-4 are you running?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working severity:medium Problems that affect many users
Projects
None yet
Development

No branches or pull requests

5 participants