mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-18 20:17:50 +00:00
enhanced routing
This commit is contained in:
parent
6cfe277a3c
commit
c395b14209
@ -1 +1 @@
|
||||
Subproject commit 592a3a5ccf7b76cfbdd53213be770c3a4a461a12
|
||||
Subproject commit 76cb632ad1ba4545ed81e04ac1e4f29182cbb8bb
|
@ -1011,33 +1011,34 @@ class LOLLMSWebUI(LOLLMSElfServer):
|
||||
return
|
||||
if operation_type == MSG_OPERATION_TYPE.MSG_OPERATION_TYPE_STEP:
|
||||
ASCIIColors.info("--> Step:"+data)
|
||||
if operation_type == MSG_OPERATION_TYPE.MSG_OPERATION_TYPE_STEP_START:
|
||||
self.update_message_step(client_id, data, operation_type)
|
||||
elif operation_type == MSG_OPERATION_TYPE.MSG_OPERATION_TYPE_STEP_START:
|
||||
ASCIIColors.info("--> Step started:"+data)
|
||||
self.update_message_step(client_id, data, operation_type)
|
||||
if operation_type == MSG_OPERATION_TYPE.MSG_OPERATION_TYPE_STEP_END_SUCCESS:
|
||||
elif operation_type == MSG_OPERATION_TYPE.MSG_OPERATION_TYPE_STEP_END_SUCCESS:
|
||||
ASCIIColors.success("--> Step ended:"+data)
|
||||
self.update_message_step(client_id, data, operation_type)
|
||||
if operation_type == MSG_OPERATION_TYPE.MSG_OPERATION_TYPE_STEP_END_FAILURE:
|
||||
elif operation_type == MSG_OPERATION_TYPE.MSG_OPERATION_TYPE_STEP_END_FAILURE:
|
||||
ASCIIColors.success("--> Step ended:"+data)
|
||||
self.update_message_step(client_id, data, operation_type)
|
||||
if operation_type == MSG_OPERATION_TYPE.MSG_OPERATION_TYPE_WARNING:
|
||||
elif operation_type == MSG_OPERATION_TYPE.MSG_OPERATION_TYPE_WARNING:
|
||||
self.warning(data,client_id=client_id)
|
||||
ASCIIColors.error("--> Exception from personality:"+data)
|
||||
if operation_type == MSG_OPERATION_TYPE.MSG_OPERATION_TYPE_EXCEPTION:
|
||||
elif operation_type == MSG_OPERATION_TYPE.MSG_OPERATION_TYPE_EXCEPTION:
|
||||
self.error(data, client_id=client_id)
|
||||
ASCIIColors.error("--> Exception from personality:"+data)
|
||||
return
|
||||
if operation_type == MSG_OPERATION_TYPE.MSG_OPERATION_TYPE_INFO:
|
||||
elif operation_type == MSG_OPERATION_TYPE.MSG_OPERATION_TYPE_INFO:
|
||||
self.info(data, client_id=client_id)
|
||||
ASCIIColors.info("--> Info:"+data)
|
||||
return
|
||||
if operation_type == MSG_OPERATION_TYPE.MSG_OPERATION_TYPE_UI:
|
||||
elif operation_type == MSG_OPERATION_TYPE.MSG_OPERATION_TYPE_UI:
|
||||
self.update_message_ui(client_id, data)
|
||||
return
|
||||
if operation_type == MSG_OPERATION_TYPE.MSG_OPERATION_TYPE_JSON_INFOS:
|
||||
elif operation_type == MSG_OPERATION_TYPE.MSG_OPERATION_TYPE_JSON_INFOS:
|
||||
self.update_message_metadata(client_id, data)
|
||||
return
|
||||
if operation_type == MSG_OPERATION_TYPE.MSG_OPERATION_TYPE_NEW_MESSAGE:
|
||||
elif operation_type == MSG_OPERATION_TYPE.MSG_OPERATION_TYPE_NEW_MESSAGE:
|
||||
self.nb_received_tokens = 0
|
||||
self.start_time = datetime.now()
|
||||
self.update_message_step(client_id, "🔥 warming up ...", MSG_OPERATION_TYPE.MSG_OPERATION_TYPE_STEP_END_SUCCESS)
|
||||
@ -1149,6 +1150,7 @@ class LOLLMSWebUI(LOLLMSElfServer):
|
||||
binding, model_name = self.model_path_to_binding_model(self.config.smart_routing_models_by_power[output_id])
|
||||
self.select_model(binding, model_name)
|
||||
self.personality.step_end("Routing request")
|
||||
self.personality.step(f"Complexity level: {output_id}")
|
||||
self.personality.step(f"Selected {self.config.smart_routing_models_by_power[output_id]}")
|
||||
except Exception as ex:
|
||||
self.error("Failed to route beceause of this error : " + str(ex))
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4
web/dist/index.html
vendored
4
web/dist/index.html
vendored
@ -6,8 +6,8 @@
|
||||
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>LoLLMS WebUI</title>
|
||||
<script type="module" crossorigin src="/assets/index-503e6468.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-c71b7e0a.css">
|
||||
<script type="module" crossorigin src="/assets/index-7c42b491.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-016e017a.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
@ -2029,6 +2029,11 @@ export default {
|
||||
index = this.discussionArr.findIndex((x) => x.id == msgObj.id)
|
||||
this.discussionArr[index].content = msgObj.content
|
||||
this.discussionArr[index].finished_generating_at = msgObj.finished_generating_at
|
||||
this.discussionArr[index].nb_tokens = msgObj.nb_tokens
|
||||
this.discussionArr[index].binding = msgObj.binding
|
||||
this.discussionArr[index].model = msgObj.model
|
||||
this.discussionArr[index].personality = msgObj.personality
|
||||
|
||||
|
||||
// const messageItem = this.discussionArr[index]
|
||||
// if (messageItem) {
|
||||
|
Loading…
Reference in New Issue
Block a user