fix: configurable ping endpoint frequency and better goal completion detection

This commit is contained in:
Twirre Meulenbelt
2026-02-09 17:06:35 +01:00
parent df489f4ac3
commit c6cb883cd1
3 changed files with 6 additions and 4 deletions

View File

@@ -538,10 +538,9 @@ class GoalAchievementInferrer(SemanticBeliefInferrer):
async def _infer_goal(self, conversation: ChatHistory, goal: BaseGoal) -> bool:
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}
Description of the goal: {goal.description or goal.name}
Answer with literally only `true` or `false` (without backticks)."""

View File

@@ -123,7 +123,7 @@ async def ping_stream(request: Request):
sub_socket.setsockopt(zmq.SUBSCRIBE, b"ping")
connected = False
ping_frequency = 2
ping_frequency = settings.behaviour_settings.sleep_s + 1
# Even though its most likely the updates should alternate
# (So, True - False - True - False for connectivity),