Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions prompting/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@

from transformers import Pipeline

RETRY_LIMIT = 3


class HumanAgent(vLLM_LLM):
"Agent that impersonates a human user and makes queries based on its goal."
Expand Down Expand Up @@ -83,14 +81,7 @@ def __init__(
if begin_conversation:
bt.logging.info("🤖 Generating challenge query...")
# initiates the conversation with the miner
for i in range(RETRY_LIMIT):
self.challenge = self.challenge_time()
if not self.challenge:
bt.logging.error("❌ Generated an empty challenge. Retrying...")
else:
break
if not self.challenge:
bt.logging.error("Max retries reached. Skipping task.")
self.challenge = self.create_challenge()

def create_challenge(self) -> str:
"""Creates the opening question of the conversation which is based on the task query but dressed in the persona of the user."""
Expand Down