This commit is contained in:
streetycat
2023-10-16 10:00:53 +00:00
parent cc4a053085
commit b117b36e5b
4 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -123,7 +123,7 @@ class ComputeKernel:
if task_req.state == ComputeTaskState.ERROR:
break
if check_times >= 120:
if check_times >= 12000:
task_req.state = ComputeTaskState.ERROR
break
+2 -1
View File
@@ -544,8 +544,9 @@ class Workflow:
async def _get_prompt_from_session(self,the_role:AIRole,chatsession:AIChatSession) -> AgentPrompt:
messages = chatsession.read_history(the_role.history_len) # read last 10 message
result_prompt = AgentPrompt()
for msg in reversed(messages):
if msg.sender == chatsession.owner_id:
if msg.sender == the_role.role_id:
result_prompt.messages.append({"role":"assistant","content":msg.body})
else:
result_prompt.messages.append({"role":"user","content":f"{msg.body}"})
+3 -2
View File
@@ -414,8 +414,8 @@ class AIOS_Shell:
if len(args) < 4:
return show_text
model_name = args[3]
url = args[4]
model_name = args[2]
url = args[3]
ComputeNodeConfig.get_instance().remove_node("llama", url, model_name)
ComputeNodeConfig.get_instance().save()
else:
@@ -747,6 +747,7 @@ async def main():
'/disable $feature',
'/node add llama $model_name $url',
'/node rm llama $model_name $url',
'/node list',
'/show',
'/exit',
'/help'], ignore_case=True)