File tree Expand file tree Collapse file tree 1 file changed +17
-12
lines changed
Expand file tree Collapse file tree 1 file changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -934,18 +934,23 @@ async function clickAnalysis(id?: number) {
934934}
935935
936936function getRecordUsage(recordId : any ) {
937- chatApi .get_chart_usage (recordId ).then ((res ) => {
938- const logHistory = chatApi .toChatLogHistory (res )
939- if (logHistory ) {
940- currentChat .value .records .forEach ((record ) => {
941- if (record .id === recordId ) {
942- record .duration = logHistory .duration
943- record .finish_time = logHistory .finish_time
944- record .total_tokens = logHistory .total_tokens
945- }
946- })
947- }
948- })
937+ chatApi
938+ .get_chart_usage (recordId )
939+ .then ((res ) => {
940+ const logHistory = chatApi .toChatLogHistory (res )
941+ if (logHistory ) {
942+ currentChat .value .records .forEach ((record ) => {
943+ if (record .id === recordId ) {
944+ record .duration = logHistory .duration
945+ record .finish_time = logHistory .finish_time
946+ record .total_tokens = logHistory .total_tokens
947+ }
948+ })
949+ }
950+ })
951+ .catch ((e ) => {
952+ console .error (e )
953+ })
949954}
950955
951956const predictAnswerRef = ref ()
You can’t perform that action at this time.
0 commit comments