| expand: false, | expand: false, | ||||
| resultText: '', | resultText: '', | ||||
| }) | }) | ||||
| setRespondingFalse() | |||||
| }, | }, | ||||
| onIterationStart: ({ data }) => { | onIterationStart: ({ data }) => { | ||||
| setWorkflowProccessData(produce(getWorkflowProccessData()!, (draft) => { | setWorkflowProccessData(produce(getWorkflowProccessData()!, (draft) => { | ||||
| return ( | return ( | ||||
| <div className={cn(isNoData && !isCallBatchAPI && 'h-full')}> | <div className={cn(isNoData && !isCallBatchAPI && 'h-full')}> | ||||
| {!isCallBatchAPI && ( | |||||
| {!isCallBatchAPI && !isWorkflow && ( | |||||
| (isResponding && !completionRes) | (isResponding && !completionRes) | ||||
| ? ( | ? ( | ||||
| <div className='flex h-full w-full justify-center items-center'> | <div className='flex h-full w-full justify-center items-center'> | ||||
| </div>) | </div>) | ||||
| : ( | : ( | ||||
| <> | <> | ||||
| {(isNoData && !workflowProcessData) | |||||
| {(isNoData) | |||||
| ? <NoData /> | ? <NoData /> | ||||
| : renderTextGenerationRes() | : renderTextGenerationRes() | ||||
| } | } | ||||
| </> | </> | ||||
| ) | ) | ||||
| )} | )} | ||||
| { | |||||
| !isCallBatchAPI && isWorkflow && ( | |||||
| (isResponding && !workflowProcessData) | |||||
| ? ( | |||||
| <div className='flex h-full w-full justify-center items-center'> | |||||
| <Loading type='area' /> | |||||
| </div> | |||||
| ) | |||||
| : !workflowProcessData | |||||
| ? <NoData /> | |||||
| : renderTextGenerationRes() | |||||
| ) | |||||
| } | |||||
| {isCallBatchAPI && ( | {isCallBatchAPI && ( | ||||
| <div className='mt-2'> | <div className='mt-2'> | ||||
| {renderTextGenerationRes()} | {renderTextGenerationRes()} |