mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-12 20:51:48 +00:00
(improvement)(chat-sdk) modify sql field and plugin card width (#1662)
This commit is contained in:
@@ -49,7 +49,7 @@ const SqlItem: React.FC<Props> = ({
|
||||
return null;
|
||||
}
|
||||
|
||||
const { schema, linking, priorExts } = llmReq || {};
|
||||
const { schema, terms, priorExts } = llmReq || {};
|
||||
|
||||
const fewShots = (Object.values(llmResp?.sqlRespMap || {})[0] as any)?.fewShots || [];
|
||||
|
||||
@@ -57,9 +57,9 @@ const SqlItem: React.FC<Props> = ({
|
||||
return `
|
||||
Schema映射
|
||||
${schema?.fieldNameList?.length > 0 ? `名称:${schema.fieldNameList.join('、')}` : ''}${
|
||||
linking?.length > 0
|
||||
schema?.values?.length > 0
|
||||
? `
|
||||
取值:${linking
|
||||
取值:${schema.values
|
||||
.map((item: any) => {
|
||||
return `${item.fieldName}: ${item.fieldValue}`;
|
||||
})
|
||||
@@ -71,9 +71,9 @@ ${schema?.fieldNameList?.length > 0 ? `名称:${schema.fieldNameList.join('、
|
||||
附加:${priorExts}`
|
||||
: ''
|
||||
}${
|
||||
schema?.terms?.length > 0
|
||||
terms?.length > 0
|
||||
? `
|
||||
术语:${schema.terms
|
||||
术语:${terms
|
||||
.map((item: any) => {
|
||||
return `${item.name}${item.alias?.length > 0 ? `(${item.alias.join(',')})` : ''}: ${
|
||||
item.description
|
||||
@@ -253,11 +253,11 @@ ${format(sqlInfo.querySQL)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
{linking?.length > 0 && (
|
||||
{schema?.values?.length > 0 && (
|
||||
<div className={`${prefixCls}-schema-row`}>
|
||||
<div className={`${prefixCls}-schema-title`}>取值:</div>
|
||||
<div className={`${prefixCls}-schema-content`}>
|
||||
{linking
|
||||
{schema.values
|
||||
.map((item: any) => {
|
||||
return `${item.fieldName}: ${item.fieldValue}`;
|
||||
})
|
||||
@@ -271,11 +271,11 @@ ${format(sqlInfo.querySQL)}
|
||||
<div className={`${prefixCls}-schema-content`}>{priorExts}</div>
|
||||
</div>
|
||||
)}
|
||||
{schema?.terms?.length > 0 && (
|
||||
{terms?.length > 0 && (
|
||||
<div className={`${prefixCls}-schema-row`}>
|
||||
<div className={`${prefixCls}-schema-title`}>术语:</div>
|
||||
<div className={`${prefixCls}-schema-content`}>
|
||||
{schema.terms
|
||||
{terms
|
||||
.map((item: any) => {
|
||||
return `${item.name}${
|
||||
item.alias?.length > 0 ? `(${item.alias.join(',')})` : ''
|
||||
|
||||
Reference in New Issue
Block a user