mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +08:00
fix: filter empty value in xlsx to improve vector similarity hit (#422)
This commit is contained in:
parent
d637a147ee
commit
23ef2262bd
|
@ -27,5 +27,7 @@ class XLSXParser(BaseParser):
|
|||
if keys == []:
|
||||
keys = list(map(str, row))
|
||||
else:
|
||||
data.append(json.dumps(dict(zip(keys, list(map(str, row)))), ensure_ascii=False))
|
||||
row_dict = dict(zip(keys, row))
|
||||
row_dict = {k: v for k, v in row_dict.items() if v}
|
||||
data.append(json.dumps(row_dict, ensure_ascii=False))
|
||||
return '\n\n'.join(data)
|
||||
|
|
|
@ -124,7 +124,7 @@ const DatasetDetailLayout: FC<IAppDetailLayoutProps> = (props) => {
|
|||
? (
|
||||
<>
|
||||
<div className={s.subTitle}>{relatedApps?.total || '--'} {t('common.datasetMenus.relatedApp')}</div>
|
||||
{relatedApps?.data?.map(item => (<LikedItem detail={item} />))}
|
||||
{relatedApps?.data?.map((item, index) => (<LikedItem key={index} detail={item} />))}
|
||||
</>
|
||||
)
|
||||
: (
|
||||
|
|
|
@ -137,8 +137,9 @@ const HitTesting: FC<Props> = ({ datasetId }: Props) => {
|
|||
<div className='text-gray-600 font-semibold mb-4'>{t('datasetHitTesting.hit.title')}</div>
|
||||
<div className='overflow-auto flex-1'>
|
||||
<div className={s.cardWrapper}>
|
||||
{hitResult?.records.map((record) => {
|
||||
{hitResult?.records.map((record, idx) => {
|
||||
return <SegmentCard
|
||||
key={idx}
|
||||
loading={false}
|
||||
detail={record.segment as any}
|
||||
score={record.score}
|
||||
|
|
Loading…
Reference in New Issue
Block a user