Hello,
I’m new in AI and I’m confused about responses I get.
this is search:
$search = "
Check ad\n
Text: $text\n
Category: $category\n\n
Analyze the provided ad text and determine its suitability based on the following criteria:\n
- profanity_check: Return true if profanity is found in the ad.\n
- spam_check: Return true if the ad is identified as spam.\n
- wrong_category: Return true if the ad is not suitable for the chosen category.\n
- other_reason: Return true if the ad is deemed unsuitable for any other reason.\n
Note: This prompt is for ads seeking to hire tradespersons, not for tradespersons posting their own ads.\n
";
And this is my request details:
->post("https://api.openai.com/v1/chat/completions", [
"model" => "gpt-3.5-turbo",
'messages' => [
[
"role" => "system",
"content" => $search
]
],
'max_tokens' => 1000,
'temperature' => 0.0,
'stop' => ['\n'],
])
I don’t know what doing wrong but on such $text = ‘sadsf ds ds dsf fds fsd fdsfdsf dsfd fds’
I get response like this:
'model' => 'gpt-3.5-turbo-0613',
'choices' =>
array (
0 =>
array (
'index' => 0,
'message' =>
array (
'role' => 'assistant',
'content' => '{
"profanity_check": false,
"spam_check": false,
"wrong_category": false,
"other_reason": false
}',
),
'finish_reason' => 'stop',
),
),
which is not expect by me.
Any ideas what I do wrong?