Skip to content

Conversation

utopia2077
Copy link
Contributor

Description

The previous implementation incorrectly used the await keyword directly on the indexing operation, which caused a TypeError when enable_summary="True" was set. like

2025-03-11 19:14:25 hostname dbgpt_serve.rag.service.service[788143] ERROR document embedding, failed:74.txt, RetryError[<Future at 0x7b5c86f44f90 state=finished raised TypeError>]

The fix involves awaiting the result of the asynchronous aembed_documents method before indexing. This change ensures that the asynchronous operation is handled correctly, preventing the error.

How Has This Been Tested?

Pass!

Snapshots:

Include snapshots for easier review.

Checklist:

  • My code follows the style guidelines of this project
  • I have already rebased the commits and made 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 the fix Bug fixes label Mar 11, 2025
Copy link
Collaborator

@fangyinc fangyinc left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link
Collaborator

@yyhhyyyyyy yyhhyyyyyy left a comment

Choose a reason for hiding this comment

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

LGTM.

@yyhhyyyyyy yyhhyyyyyy merged commit dc5b1f7 into eosphoros-ai:main Mar 12, 2025
2 checks passed
FOkvj pushed a commit to FOkvj/DB-GPT that referenced this pull request Mar 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants