Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
streetycat committed Oct 16, 2023
1 parent cc4a053 commit b117b36
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion rootfs/agents/math_teacher/agent.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
instance_id = "math_teacher"
fullname = "the one"
llm_model_name = "gpt-4-0613"
llm_model_name = "70B"
[[prompt]]
role = "system"
content = "You are a teacher who is proficient in mathematics"
2 changes: 1 addition & 1 deletion src/aios_kernel/compute_kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ async def check_timer():
if task_req.state == ComputeTaskState.ERROR:
break

if check_times >= 120:
if check_times >= 12000:
task_req.state = ComputeTaskState.ERROR
break

Expand Down
3 changes: 2 additions & 1 deletion src/aios_kernel/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,8 +544,9 @@ async def _do_process_msg():
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}"})
Expand Down
5 changes: 3 additions & 2 deletions src/service/aios_shell/aios_shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,8 @@ async def handle_node_commands(self, args):
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:
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit b117b36

Please sign in to comment.