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

fix: handle x-request-id in MetaInformation #283

Merged
merged 1 commit into from
Nov 30, 2023
Merged

fix: handle x-request-id in MetaInformation #283

merged 1 commit into from
Nov 30, 2023

Conversation

olegnowikow
Copy link
Contributor

What:

  • Bug Fix
  • New Feature

Description:

Fix handle of the x-request-id header when using models that do not return it:

<?php

namespace App\Service;

use OpenAI;

final class Ai
{
    private $client;

    public function __construct()
    {
        $this->client = OpenAI::factory()
            ->withBaseUri('http://localhost:8888/v1')
            ->make();
    }

    public function getModels()
    {
        return $this->client->models()->list();
    }
}

image

Related:

#253

@gehrisandro gehrisandro merged commit d17b455 into openai-php:main Nov 30, 2023
6 of 8 checks passed
@gehrisandro
Copy link
Collaborator

Thans @olegnowikow for your PR!

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

Successfully merging this pull request may close these issues.

2 participants