mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 11:07:06 +00:00
(improvement)(chat) modify sql field (#1380)
This commit is contained in:
@@ -73,8 +73,8 @@ export type EntityDimensionType = {
|
||||
};
|
||||
|
||||
export type SqlInfoType = {
|
||||
s2SQL: string;
|
||||
correctS2SQL: string;
|
||||
parsedS2SQL: string;
|
||||
correctedS2SQL: string;
|
||||
querySQL: string;
|
||||
};
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ const SqlItem: React.FC<Props> = ({
|
||||
setSqlType('');
|
||||
};
|
||||
|
||||
if (!llmReq && !sqlInfo.s2SQL && !sqlInfo.correctS2SQL && !sqlInfo.querySQL) {
|
||||
if (!llmReq && !sqlInfo.parsedS2SQL && !sqlInfo.correctedS2SQL && !sqlInfo.querySQL) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -87,25 +87,25 @@ const SqlItem: React.FC<Props> = ({
|
||||
Few-shot示例
|
||||
</div>
|
||||
)}
|
||||
{sqlInfo.s2SQL && (
|
||||
{sqlInfo.parsedS2SQL && (
|
||||
<div
|
||||
className={`${tipPrefixCls}-content-option ${
|
||||
sqlType === 's2SQL' ? `${tipPrefixCls}-content-option-active` : ''
|
||||
sqlType === 'parsedS2SQL' ? `${tipPrefixCls}-content-option-active` : ''
|
||||
}`}
|
||||
onClick={() => {
|
||||
setSqlType(sqlType === 's2SQL' ? '' : 's2SQL');
|
||||
setSqlType(sqlType === 'parsedS2SQL' ? '' : 'parsedS2SQL');
|
||||
}}
|
||||
>
|
||||
{queryMode === 'LLM_S2SQL' || queryMode === 'PLAIN_TEXT' ? 'LLM' : 'Rule'}解析S2SQL
|
||||
</div>
|
||||
)}
|
||||
{sqlInfo.correctS2SQL && (
|
||||
{sqlInfo.correctedS2SQL && (
|
||||
<div
|
||||
className={`${tipPrefixCls}-content-option ${
|
||||
sqlType === 'correctS2SQL' ? `${tipPrefixCls}-content-option-active` : ''
|
||||
sqlType === 'correctedS2SQL' ? `${tipPrefixCls}-content-option-active` : ''
|
||||
}`}
|
||||
onClick={() => {
|
||||
setSqlType(sqlType === 'correctS2SQL' ? '' : 'correctS2SQL');
|
||||
setSqlType(sqlType === 'correctedS2SQL' ? '' : 'correctedS2SQL');
|
||||
}}
|
||||
>
|
||||
修正S2SQL
|
||||
|
||||
Reference in New Issue
Block a user