fix: configurable ping endpoint frequency and better goal completion detection
This commit is contained in:
@@ -3,6 +3,9 @@
|
|||||||
# The hostname of the Robot Interface. Change if the Control Backend and Robot Interface are running on different computers.
|
# The hostname of the Robot Interface. Change if the Control Backend and Robot Interface are running on different computers.
|
||||||
RI_HOST="localhost"
|
RI_HOST="localhost"
|
||||||
|
|
||||||
|
# The hostname of the User Interface. This is what the browser displays in the URL bar. Strangely, even if the UI is running on a different host than the backend, if the computer with the browser is also hosting the UI itself, this value should be http://localhost.
|
||||||
|
UI_HOST="http://localhost:5173"
|
||||||
|
|
||||||
# URL for the local LLM API. Must be an API that implements the OpenAI Chat Completions API, but most do.
|
# URL for the local LLM API. Must be an API that implements the OpenAI Chat Completions API, but most do.
|
||||||
LLM_SETTINGS__LOCAL_LLM_URL="http://localhost:1234/v1/chat/completions"
|
LLM_SETTINGS__LOCAL_LLM_URL="http://localhost:1234/v1/chat/completions"
|
||||||
|
|
||||||
|
|||||||
@@ -538,10 +538,9 @@ class GoalAchievementInferrer(SemanticBeliefInferrer):
|
|||||||
async def _infer_goal(self, conversation: ChatHistory, goal: BaseGoal) -> bool:
|
async def _infer_goal(self, conversation: ChatHistory, goal: BaseGoal) -> bool:
|
||||||
prompt = f"""{self._format_conversation(conversation)}
|
prompt = f"""{self._format_conversation(conversation)}
|
||||||
|
|
||||||
Given the above conversation, what has the following goal been achieved?
|
Given the above conversation, has the following goal been achieved?
|
||||||
|
|
||||||
The name of the goal: {goal.name}
|
Description of the goal: {goal.description or goal.name}
|
||||||
Description of the goal: {goal.description}
|
|
||||||
|
|
||||||
Answer with literally only `true` or `false` (without backticks)."""
|
Answer with literally only `true` or `false` (without backticks)."""
|
||||||
|
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ async def ping_stream(request: Request):
|
|||||||
sub_socket.setsockopt(zmq.SUBSCRIBE, b"ping")
|
sub_socket.setsockopt(zmq.SUBSCRIBE, b"ping")
|
||||||
connected = False
|
connected = False
|
||||||
|
|
||||||
ping_frequency = 2
|
ping_frequency = settings.behaviour_settings.sleep_s + 1
|
||||||
|
|
||||||
# Even though its most likely the updates should alternate
|
# Even though its most likely the updates should alternate
|
||||||
# (So, True - False - True - False for connectivity),
|
# (So, True - False - True - False for connectivity),
|
||||||
|
|||||||
Reference in New Issue
Block a user