Skip to content

Commit

Permalink
Simplify lower methods calls
Browse files Browse the repository at this point in the history
  • Loading branch information
Flagro committed Dec 3, 2024
1 parent 70ddab9 commit 83482fa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bot/rp_bot/ai_agent/agent_tools/base_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ async def ask_yes_no_question(self, question: str) -> bool:
temperature=self.models_toolkit.ai_config.TextGeneration.temperature,
)
text_response = response.choices[0].message.content
if "yes" in text_response.lower():
lower_response = text_response.lower()
if "yes" in lower_response:
return True
if "no" in text_response.lower():
if "no" in lower_response:
return False
return False

0 comments on commit 83482fa

Please sign in to comment.