From f6f3251136503642b5250da3effecb134fba1fe6 Mon Sep 17 00:00:00 2001
From: Silin <silin.gao@epfl.ch>
Date: Sun, 10 Dec 2023 08:39:02 +0000
Subject: [PATCH] Update dummy_prompt_agent.py

---
 agents/dummy_prompt_agent.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/agents/dummy_prompt_agent.py b/agents/dummy_prompt_agent.py
index 9dc7596..b7e5ba0 100644
--- a/agents/dummy_prompt_agent.py
+++ b/agents/dummy_prompt_agent.py
@@ -10,7 +10,7 @@ class DummyPromptAgent(object):
         self.max_generated_token_per_call = 20      # Can be set by user as needed, can be different for each utterance and dialogue
         self.api_usage_count = 0 
 
-    def generate_responses(self, test_data: List[Dict], api_responses: List[str]) -> List[str]:
+    def generate_responses(self, test_data: List[Dict], api_responses: List[str], final=False) -> List[str]:
         """
         You will be provided with a batch of upto 50 independent conversations
         
@@ -47,7 +47,7 @@ class DummyPromptAgent(object):
         """
         # print(f"{len(test_data)=}, {test_data[0].keys()=}, {len(test_data[-1]['dialogue'])}")
 
-        if self.api_usage_count < self.api_limit:
+        if self.api_usage_count < self.api_limit and not final:
             self.api_usage_count += 1
             response = {
                 "use_api": True,                                    
-- 
GitLab