Skip to content

Using assistant/thread/run #147

@piernik

Description

@piernik

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions