fix bugs
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
instance_id = "math_teacher"
|
instance_id = "math_teacher"
|
||||||
fullname = "the one"
|
fullname = "the one"
|
||||||
llm_model_name = "gpt-4-0613"
|
llm_model_name = "70B"
|
||||||
[[prompt]]
|
[[prompt]]
|
||||||
role = "system"
|
role = "system"
|
||||||
content = "You are a teacher who is proficient in mathematics"
|
content = "You are a teacher who is proficient in mathematics"
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ class ComputeKernel:
|
|||||||
if task_req.state == ComputeTaskState.ERROR:
|
if task_req.state == ComputeTaskState.ERROR:
|
||||||
break
|
break
|
||||||
|
|
||||||
if check_times >= 120:
|
if check_times >= 12000:
|
||||||
task_req.state = ComputeTaskState.ERROR
|
task_req.state = ComputeTaskState.ERROR
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|||||||
@@ -544,8 +544,9 @@ class Workflow:
|
|||||||
async def _get_prompt_from_session(self,the_role:AIRole,chatsession:AIChatSession) -> AgentPrompt:
|
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
|
messages = chatsession.read_history(the_role.history_len) # read last 10 message
|
||||||
result_prompt = AgentPrompt()
|
result_prompt = AgentPrompt()
|
||||||
|
|
||||||
for msg in reversed(messages):
|
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})
|
result_prompt.messages.append({"role":"assistant","content":msg.body})
|
||||||
else:
|
else:
|
||||||
result_prompt.messages.append({"role":"user","content":f"{msg.body}"})
|
result_prompt.messages.append({"role":"user","content":f"{msg.body}"})
|
||||||
|
|||||||
@@ -414,8 +414,8 @@ class AIOS_Shell:
|
|||||||
if len(args) < 4:
|
if len(args) < 4:
|
||||||
return show_text
|
return show_text
|
||||||
|
|
||||||
model_name = args[3]
|
model_name = args[2]
|
||||||
url = args[4]
|
url = args[3]
|
||||||
ComputeNodeConfig.get_instance().remove_node("llama", url, model_name)
|
ComputeNodeConfig.get_instance().remove_node("llama", url, model_name)
|
||||||
ComputeNodeConfig.get_instance().save()
|
ComputeNodeConfig.get_instance().save()
|
||||||
else:
|
else:
|
||||||
@@ -747,6 +747,7 @@ async def main():
|
|||||||
'/disable $feature',
|
'/disable $feature',
|
||||||
'/node add llama $model_name $url',
|
'/node add llama $model_name $url',
|
||||||
'/node rm llama $model_name $url',
|
'/node rm llama $model_name $url',
|
||||||
|
'/node list',
|
||||||
'/show',
|
'/show',
|
||||||
'/exit',
|
'/exit',
|
||||||
'/help'], ignore_case=True)
|
'/help'], ignore_case=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user