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(agent): Refactor resource of agents #1518

Merged
merged 6 commits into from
May 15, 2024

Conversation

fangyinc
Copy link
Collaborator

Description

Refactor the plugin module and resource module into a unified resource module.

There are several resource types in the agent, including database, knowledge, tool, pack, etc.
Specifically, the collection of resources is a special type of resource, called a resource pack.

How Has This Been Tested?

To test the new resource module, you can run all python files in the examples/agents directory.

Snapshots:

Include snapshots for easier review.

Checklist:

  • My code follows the style guidelines of this project
  • I have already rebased the commits and make the commit message conform to the project standard.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • Any dependent changes have been merged and published in downstream modules

@github-actions github-actions bot added agent Module: agent internal DB-GPT internal flag(chore|ci|refactor|test) labels May 13, 2024
@csunny
Copy link
Collaborator

csunny commented May 14, 2024

Bug about pydantic upgrade

"1 validation error for SqlRunData\nrun_cost\n  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=6.7138671875e-05, input_type=float]\n    For further information visit https://errors.pydantic.dev/2.7/v/int_from_float"

@fangyinc
Copy link
Collaborator Author

Bug about pydantic upgrade

"1 validation error for SqlRunData\nrun_cost\n  Input should be a valid integer, got a number with a fractional part [type=int_from_float, input_value=6.7138671875e-05, input_type=float]\n    For further information visit https://errors.pydantic.dev/2.7/v/int_from_float"

FIx it.

Copy link
Collaborator

@csunny csunny left a comment

Choose a reason for hiding this comment

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

Great refactor, that makes the relationship between resources and agents clearer.

image

Copy link
Collaborator

@yhjun1026 yhjun1026 left a comment

Choose a reason for hiding this comment

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

r+

@fangyinc fangyinc merged commit 559affe into eosphoros-ai:main May 15, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent Module: agent internal DB-GPT internal flag(chore|ci|refactor|test)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants