open-ai icon indicating copy to clipboard operation
open-ai copied to clipboard

Using assistant/thread/run

Open piernik opened this issue 1 year ago • 1 comments

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

piernik avatar Jun 15 '24 13:06 piernik

I don't think v2 works with 4o yet.

git9875 avatar Sep 09 '24 05:09 git9875