Skip to content

Commit 23d1cb4

Browse files
authored
Feat/2.4.0 beta1 (#1908)
2 parents 7df1e20 + d63c7d5 commit 23d1cb4

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/backend/bisheng/chat/clients/workflow_client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ async def check_status(self, message: dict, is_init: bool = False) -> (bool, str
129129

130130
async def get_execute_worker(self) -> Optional[str]:
131131
if not self.hash_key:
132-
return None
132+
self.hash_key = self.chat_id if self.chat_id else generate_uuid()
133133
return await workflow_stateful_worker.find_task_node(self.hash_key)
134134

135135
async def init_workflow(self, message: dict):
@@ -147,7 +147,6 @@ async def init_workflow(self, message: dict):
147147
await self.workflow.async_set_workflow_data(workflow_data)
148148
await self.workflow.async_set_workflow_status(WorkflowStatus.WAITING.value)
149149
# Start asynchronous task
150-
self.hash_key = self.chat_id if self.chat_id else generate_uuid()
151150

152151
execute_workflow.apply_async([unique_id, workflow_id, self.chat_id, self.user_id],
153152
queue=await self.get_execute_worker())

src/backend/bisheng/chat/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,15 @@ def sync_judge_source(result, source_document, chat_id, extra: Dict):
135135
if any(not doc.metadata.get('right', True) for doc in source_document):
136136
source = SourceType.NO_PERMISSION.value
137137
elif all(
138-
doc.metadata.get('user_metadata') and json.loads(doc.metadata.get('user_metadata', '{}')).get('url')
138+
doc.metadata.get('user_metadata') and doc.metadata.get('user_metadata', {}).get('url')
139139
for doc in source_document):
140140
source = SourceType.LINK.value
141141
repeat_doc = {}
142142
doc = []
143143
# The source document should be de-emphasized and the original order cannot be changed.
144144
for one in source_document:
145145
title = one.metadata.get('source') or one.metadata.get('document_name')
146-
url = json.loads(one.metadata.get('user_metadata', '{}')).get('url')
146+
url = one.metadata.get('user_metadata', {}).get('url')
147147
repeat_key = (title, url)
148148
# Repeatedly discarded, do not return
149149
if repeat_doc.get(repeat_key):

src/frontend/client/src/pages/appChat/useChatHelpers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ export default function useChatHelpers() {
273273
create_time: formatDate(new Date(), "yyyy-MM-ddTHH:mm:ss"),
274274
source: data.source,
275275
end: data.type === "end",
276+
extra: data.extra,
276277
}
277278
return updatedMessages
278279
}

src/frontend/platform/src/contexts/locationContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export function LocationProvider({ children }: { children: ReactNode }) {
102102
setAppConfig(prev => ({
103103
...prev,
104104
benchMenu: bench?.menuShow ?? true,
105-
worksapceIcon: bench?.assistantIcon.image ?? '',
105+
worksapceIcon: bench?.assistantIcon?.image ?? '',
106106
}));
107107
})
108108
.catch(error => {

0 commit comments

Comments
 (0)