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 code #9

Merged
merged 13 commits into from
Jul 16, 2024
Merged

refactor code #9

merged 13 commits into from
Jul 16, 2024

Conversation

XuhuiZhou
Copy link
Owner

@XuhuiZhou XuhuiZhou commented Jul 10, 2024

Closes #5

📑 Description

In order to keep the agent outputting actions to call the tools, we can basically utilize an internal validator like this:


Using such a mechanism could ensure the structure of the agent output is correct.

To realize this, basically we need to have the tool parser:

class VenmoSendMoneyReturns(BaseModel):

This format can do a rule-based check of the output of LLMs.

✅ Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed
  • Branch name follows type/descript (e.g. feature/add-llm-agents)
  • Ready for code review

ℹ Additional Information

@ProKil
Copy link
Collaborator

ProKil commented Jul 16, 2024

You can try out pydantic validator? In sotopia, we may want to use it in place of beartype.

sotopia-lab/sotopia#115

Copy link
Collaborator

@GloriaXimingLu GloriaXimingLu left a comment

Choose a reason for hiding this comment

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

thanks for adding the interface for checking the tool! I'll edit my pull request based on this.

@XuhuiZhou
Copy link
Owner Author

You can try out pydantic validator? In sotopia, we may want to use it in place of beartype.

sotopia-lab/sotopia#115

Good point! I will think this further and probably implement this on other pull requests

@XuhuiZhou XuhuiZhou merged commit 412f329 into main Jul 16, 2024
5 checks passed
@XuhuiZhou XuhuiZhou deleted the feature/refactor_llm_engine branch August 12, 2024 03:18
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.

[FEAT]: refactor llm_engine.py
3 participants