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