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

在线查询 支持AI根据描述生成查询语句 #2726

Merged
merged 7 commits into from
Jul 18, 2024
Merged

在线查询 支持AI根据描述生成查询语句 #2726

merged 7 commits into from
Jul 18, 2024

Conversation

QSummerY
Copy link
Contributor

@QSummerY QSummerY commented Jul 15, 2024

在线查询页面中,输入指定的查询描述以及选择好数据结构,点击生成SQL按钮可以通过 openai 实现自动生成查询语句,并将返回置于查询内容框中
image
image

@QSummerY QSummerY marked this pull request as draft July 15, 2024 08:21
Copy link

request-info bot commented Jul 15, 2024

你好!感谢你反馈的问题/bug,但是你的描述好像是空的,我们需要你完整的信息,这样才能帮你解决问题 如果不知道怎么写,在新建issue的时候有若干个模板可供选择,祝好!

archery/settings.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jul 16, 2024

Codecov Report

Attention: Patch coverage is 87.70492% with 15 lines in your changes missing coverage. Please review.

Project coverage is 77.22%. Comparing base (52ce759) to head (64eeae0).

Files Patch % Lines
sql/query.py 53.12% 15 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2726      +/-   ##
==========================================
+ Coverage   77.14%   77.22%   +0.07%     
==========================================
  Files         117      119       +2     
  Lines       16174    16296     +122     
==========================================
+ Hits        12477    12584     +107     
- Misses       3697     3712      +15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

common/utils/openai.py Outdated Show resolved Hide resolved
@nick2wang
Copy link
Collaborator

建议可以自定义配置base_url,国内很多AI模型都兼容openai接口规范,这样只要配置接口地址+key就可以很方便接入其他AI
例如通义千问:
https://help.aliyun.com/zh/dashscope/developer-reference/compatibility-of-openai-with-dashscope

@QSummerY
Copy link
Contributor Author

建议可以自定义配置base_url,国内很多AI模型都兼容openai接口规范,这样只要配置接口地址+key就可以很方便接入其他AI 例如通义千问: https://help.aliyun.com/zh/dashscope/developer-reference/compatibility-of-openai-with-dashscope

在系统配置的配置项管理中提供了 base_url + key + default_chat_model 的自定义配置

@QSummerY QSummerY marked this pull request as ready for review July 17, 2024 06:43
@QSummerY QSummerY requested a review from LeoQuote July 17, 2024 06:46
sql/templates/sqlquery.html Show resolved Hide resolved
sql/templates/sqlquery.html Outdated Show resolved Hide resolved
@QSummerY QSummerY requested a review from LeoQuote July 17, 2024 10:05
common/utils/openai.py Outdated Show resolved Hide resolved
common/utils/openai.py Outdated Show resolved Hide resolved
common/utils/openai.py Outdated Show resolved Hide resolved
@LeoQuote LeoQuote merged commit 020683e into hhyo:master Jul 18, 2024
10 checks passed
@QSummerY QSummerY deleted the AIQuery branch July 18, 2024 01:59
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.

3 participants