Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using assistant/thread/run #147

Open
piernik opened this issue Jun 15, 2024 · 1 comment
Open

Using assistant/thread/run #147

piernik opened this issue Jun 15, 2024 · 1 comment

Comments

@piernik
Copy link

piernik commented Jun 15, 2024

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

@git9875
Copy link

git9875 commented Sep 9, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants