Skip to content
Snippets Groups Projects
Verified Commit eb2ce456 authored by Sofiane Lasri's avatar Sofiane Lasri
Browse files

feat: update bot detection prompt for clarity

- Changed prompt text from "bot detector" to "robot detector" for consistency.
- Enhanced the user agent query to specify detection of "tools that are not web browsers" for better accuracy.
parent aad6fcc7
No related branches found
No related tags found
No related merge requests found
Pipeline #1038 passed
......@@ -23,8 +23,8 @@ public function handle(AiProviderService $aiProviderService): void
{
try {
$result = $aiProviderService->prompt(
'You are a bot detector designed to output JSON. ',
"Is this user agent a bot? Please respond in the format {'is_bot': true/false}. The user agent is: {$this->userAgent->user_agent}"
'You are a robot detector designed to output JSON. ',
"Is this user agent a robot or a tool that is not a web browser? Please respond in the format {'is_bot': true/false}. The user agent is: {$this->userAgent->user_agent}"
);
$isBot = $result['is_bot'] ?? false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment