Skip to content

Commit

Permalink
Merge pull request fiatrete#83 from streetycat/main
Browse files Browse the repository at this point in the history
fix bugs
  • Loading branch information
waterflier committed Oct 17, 2023
2 parents cc4a053 + d945796 commit 31d4f91
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
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 31d4f91

Please sign in to comment.