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

refactor: clean up agent.step() #1756

Merged
merged 2 commits into from
Sep 14, 2024
Merged

refactor: clean up agent.step() #1756

merged 2 commits into from
Sep 14, 2024

Conversation

cpacker
Copy link
Owner

@cpacker cpacker commented Sep 13, 2024

Initial stab at cleaning up the agent step by removing dead code + turning the response into a response model instead of a tuple.

Follow-up PRs should do the following cleanup:

  • Unify the type going into step (probably should drop support for str, make it None or Message?)
  • Move unnecessary kwargs into configs
  • Strip out ms (replace with session)
  • Move input validation out of step and into the loop handler
    • This ensures that step corresponds to a single LLM call (unless a summarization happens, in which case we probably want to return a dual usage? or put a summarization event into the response model?)
  • Potentially change the input of step to be a model as well (probably cleaner if we don't do this)

Copy link
Collaborator

@sarahwooders sarahwooders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@cpacker cpacker merged commit ca11164 into main Sep 14, 2024
12 checks passed
@cpacker cpacker deleted the agent-step-cleanup branch September 14, 2024 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants