open-ai
open-ai copied to clipboard
Using assistant/thread/run
Describe the feature or improvement you're requesting
I'm trying to use assistant with 4o. Problem is that I cannot get an answer. How to do it? Here is my code so far:
$open_ai = new OpenAi(self::OPEN_AI_KEY);
$open_ai->setAssistantsBetaVersion("v2");
$thread = $open_ai->createThread([
'messages' => [
[
'role' => 'user',
'content' => 'miasto: tarnowskie Góry, osoby: 2 dorosłe, aktywność: zabytki',
],
],
]);
$threadResult = json_decode($thread);
$data = [
'assistant_id' => self::ASSISTANT_ID,
];
$run = $open_ai->createRun($threadResult->id, $data);
var_dump($run);
Now what? How to get final anwser?
Additional context
No response
I don't think v2 works with 4o yet.