Skip to content

Instantly share code, notes, and snippets.

@diogenesjup
Created March 17, 2025 04:43
Show Gist options
  • Save diogenesjup/ccd6a6f0831a3c534f75b9f7ad2c5a66 to your computer and use it in GitHub Desktop.
Save diogenesjup/ccd6a6f0831a3c534f75b9f7ad2c5a66 to your computer and use it in GitHub Desktop.
Mini agente avaliação de resposta
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.diogenesjunior.com.br/ia/gpt4-agents-mini',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => 'origem=postman&prompt=Avalie%20a%20resposta%20do%20usu%C3%A1rio%20se%20estiver%20correta%2C%20responda%20APENAS%20\'CORRETA\'%2C%20caso%20contr%C3%A1rio%20oriente%20o%20usu%C3%A1rio%20a%20responder%20corretamente&max_tokens=500&pergunta=Escreva%20uma%20hist%C3%B3ria%20com%20no%20minimo%20tr%C3%AAs%20paragrafos&resposta=Era%20uma%20vez%20tr%C3%AAs%20porquinhos%20que%20construiram%20uma%20casa',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/x-www-form-urlencoded'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment