openai-php / client

⚡️ OpenAI PHP is a supercharged community-maintained PHP API client that allows you to interact with OpenAI API.
MIT License
4.56k stars 466 forks source link

[Bug]: Assistants API Run object missing usage field #327

Closed punyflash closed 5 months ago

punyflash commented 5 months ago

Description

Run object according to the documentation have different structure from what we have in ThreadRunResponse:

    private function __construct(
        public string $id,
        public string $object,
        public int $createdAt,
        public string $threadId,
        public string $assistantId,
        public string $status,
        public ?ThreadRunResponseRequiredAction $requiredAction,
        public ?ThreadRunResponseLastError $lastError,
        public ?int $expiresAt,
        public ?int $startedAt,
        public ?int $cancelledAt,
        public ?int $failedAt,
        public ?int $completedAt,
        public string $model,
        public ?string $instructions,
        public array $tools,
        public array $fileIds,
        public array $metadata,
        private readonly MetaInformation $meta,
    ) {
    }

Steps To Reproduce

Field can not be accessed.

OpenAI PHP Client Version

v0.8.2

PHP Version

8.2.14

Notes

No response

gehrisandro commented 5 months ago

@punyflash Thanks for reposting. Will be added in the next release.