From c45eafea61da8cbe47d003bd8b84a0e4c376b52c Mon Sep 17 00:00:00 2001 From: Bing Wen Tan Date: Sun, 3 Mar 2024 09:56:51 +0800 Subject: [PATCH 1/2] logged report --- implementation/agent.py | 1 + 1 file changed, 1 insertion(+) diff --git a/implementation/agent.py b/implementation/agent.py index 1061c0d..fef2939 100644 --- a/implementation/agent.py +++ b/implementation/agent.py @@ -31,6 +31,7 @@ def agent_report(self, reasoning, category, truth_score = None, subjects = None) self.reasoning = reasoning self.category = category self.truth_score = truth_score + logging.info(f"Agent report received\nReasoning: {reasoning}\nCategory: {category}\nTruth Score: {truth_score}") return "Report Received" def check_message(self, message: MessagePayload): From 0d144166c3c0d34e4fdc60858ad0436a1ab9e319 Mon Sep 17 00:00:00 2001 From: Bing Wen Tan Date: Sat, 9 Mar 2024 09:16:11 +0800 Subject: [PATCH 2/2] added logging and changed truth score --- base/schemas.py | 2 +- implementation/agent.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/base/schemas.py b/base/schemas.py index 525e6c3..9e5abca 100644 --- a/base/schemas.py +++ b/base/schemas.py @@ -27,7 +27,7 @@ class VoteInitialisation(BaseModel): class Vote(BaseModel): category: FactCheckCategory - truthScore: Optional[Annotated[int, Field(ge=0, le=5)]] = None + truthScore: Optional[Annotated[int, Field(ge=1, le=5)]] = None class UnsupportedMessageTypeException(Exception): pass \ No newline at end of file diff --git a/implementation/agent.py b/implementation/agent.py index fef2939..b72ea38 100644 --- a/implementation/agent.py +++ b/implementation/agent.py @@ -97,6 +97,7 @@ def process_call(tool_call): run_id=run.id, tool_outputs=tool_outputs ) + logging.info(f"Agent complete: {agent_complete}, thread_id: {thread.id}, run_id: {run.id}") if not agent_complete: raise TimeoutError("Agent did not complete in time") if not self.category: