Skip to content

Commit

Permalink
logic refine
Browse files Browse the repository at this point in the history
  • Loading branch information
vyokky committed May 8, 2024
1 parent 9cf9bec commit 13046c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions ufo/agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def __init__(
self.experience_retriever = None
self.human_demonstration_retriever = None
self.Puppeteer = self.create_puppteer_interface()
self.host = None
self._host = None

def get_prompter(
self,
Expand Down Expand Up @@ -295,14 +295,14 @@ def set_host(self, host: HostAgent) -> None:
Set the host agent.
:param host: The host agent.
"""
self.host = host
self._host = host

def get_host(self) -> HostAgent:
"""
Get the host agent that manages the AppAgent.
:return: The host agent.
"""
return self.host
return self._host

def build_offline_docs_retriever(self) -> None:
"""
Expand Down
3 changes: 1 addition & 2 deletions ufo/module/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
ErrorState,
MaxStepReachedState,
NoneState,
SessionFinishState,
StatusToStateMapper,
)

Expand Down Expand Up @@ -436,7 +435,7 @@ def is_finish(self) -> bool:
return: True if the session is ended, otherwise False.
"""

# Finish the session if the state is SessionFinishState, ErrorState, MaxStepReachedState, or NoneState.
# Finish the session if the state is ErrorState, MaxStepReachedState, or NoneState.
return (
True
if isinstance(
Expand Down

0 comments on commit 13046c6

Please sign in to comment.