feat: show citation info in run history (#3399)

This commit is contained in:
Nite Knite 2024-04-12 12:19:27 +08:00 • committed by GitHub
commit c9abb75fce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 14 additions and 11 deletions

View file

@ -35,7 +35,7 @@ const ChatRecord = () => {
content: item.answer,
feedback: item.feedback,
isAnswer: true,
citation: item.retriever_resources,
citation: item.metadata?.retriever_resources,
message_files: item.message_files?.filter((file: any) => file.belongs_to === 'assistant') || [],
workflow_run_id: item.workflow_run_id,
})
@ -82,9 +82,11 @@ const ChatRecord = () => {
</div>
<div className='grow h-0'>
<Chat
config={{} as any}
config={{
supportCitationHitInfo: true,
} as any}
chatList={chatMessageList}
chatContainerclassName='px-4'
chatContainerClassName='px-4'
chatContainerInnerClassName='pt-6'
chatFooterClassName='px-4 rounded-b-2xl'
chatFooterInnerClassName='pb-4'

View file

@ -94,7 +94,7 @@ const ChatWrapper = forwardRef<ChatWrapperRefType>((_, ref) => {
} as any}
chatList={chatList}
isResponding={isResponding}
chatContainerclassName='px-4'
chatContainerClassName='px-4'
chatContainerInnerClassName='pt-6'
chatFooterClassName='px-4 rounded-bl-2xl'
chatFooterInnerClassName='pb-4'