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

Changed the value setting method for step.input and step.additional_input during step execution #40

Closed
wants to merge 1 commit into from

Conversation

mahm
Copy link

@mahm mahm commented Aug 19, 2023

With the current specification, even if the agent generates prompts for executing steps during the planning phase, as shown in the code below, None will be set if the client does not explicitly provide the step's body.

async def _plan(task: Task, step: Step) -> Step:
    planner = load_chat_planner(model)
    plans = planner.plan({"input": task.input}).steps
    for i, plan in enumerate(plans):
        is_last_step = i == len(plans) - 1
        await Agent.db.create_step(
            task_id=task.task_id,
            name=StepTypes.ACTION,
            input=plan.value,
            is_last=is_last_step
        )
    step.output = "\n".join([f"- {plan.value}" for s in plans])
    return step

I found it unnatural to always have to explicitly specify the prompt to be executed in the step from the client when calling the agent, so I created this pull request. If this change does not conflict with the design philosophy, please merge it.

@vercel
Copy link

vercel bot commented Aug 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated (UTC)
agent-protocol-docs ⬜️ Ignored (Inspect) Visit Preview Aug 19, 2023 0:38am

jakubno
jakubno previously approved these changes Aug 28, 2023
@jakubno jakubno dismissed their stale review August 28, 2023 07:21

I missed the problem with user overriding the values

@jakubno
Copy link
Contributor

jakubno commented Aug 28, 2023

@mahm, thanks for your input and sorry for late reply. Looking forward to hearing your opinion

@hackgoofer
Copy link
Contributor

Hi, we are going to close this PR, this feels like a big enough change for RFC, mind submitting an issue about this?

We may be deprecating the "input" for the task. There have been some discussion on this for v2. :)
#70

@hackgoofer hackgoofer closed this Sep 21, 2023
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.

3 participants