Skip to content

Conversation

@jiaoqiyuan
Copy link
Contributor

@jiaoqiyuan jiaoqiyuan commented Feb 18, 2025

Description

fix #2158

In the ChatDB mode, when performing database Q&A based on the DeepSeek model, the returned data contains SQL but is not correctly parsed due to the absence of the direct_response field. Here, we set default empty string values for the display_type and direct_response fields to avoid situations where the large model cannot fully return as required (but still returns SQL), leading to an inability to answer questions.

How Has This Been Tested?

  • make fmt
  • make mypy
  • make test

Snapshots:

Response: Can not find sql in response:
image

It is because the returned JSON content includes thoughts, sql, and direct_response, but is missing display_type.
image

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 the fix Bug fixes label Feb 18, 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.

[Bug] [Module Name] ChatData error,Can not find sql in response

1 participant