-
-
Notifications
You must be signed in to change notification settings - Fork 523
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #195 from openai-php/add-header-information
[0.6.x] Add access to meta / header information
- Loading branch information
Showing
78 changed files
with
1,011 additions
and
277 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace OpenAI\Contracts; | ||
|
||
use ArrayAccess; | ||
|
||
/** | ||
* @template TArray of array | ||
* | ||
* @extends ArrayAccess<key-of<TArray>, value-of<TArray>> | ||
* | ||
* @internal | ||
*/ | ||
interface MetaInformationContract extends ArrayAccess | ||
{ | ||
/** | ||
* Returns the array representation of the meta information. | ||
* | ||
* @return TArray | ||
*/ | ||
public function toArray(): array; | ||
|
||
/** | ||
* @param key-of<TArray> $offset | ||
*/ | ||
public function offsetExists(mixed $offset): bool; | ||
|
||
/** | ||
* @template TOffsetKey of key-of<TArray> | ||
* | ||
* @param TOffsetKey $offset | ||
* @return TArray[TOffsetKey] | ||
*/ | ||
public function offsetGet(mixed $offset): mixed; | ||
|
||
/** | ||
* @template TOffsetKey of key-of<TArray> | ||
* | ||
* @param TOffsetKey $offset | ||
* @param TArray[TOffsetKey] $value | ||
*/ | ||
public function offsetSet(mixed $offset, mixed $value): never; | ||
|
||
/** | ||
* @template TOffsetKey of key-of<TArray> | ||
* | ||
* @param TOffsetKey $offset | ||
*/ | ||
public function offsetUnset(mixed $offset): never; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace OpenAI\Contracts; | ||
|
||
use OpenAI\Responses\Meta\MetaInformation; | ||
|
||
interface ResponseHasMetaInformationContract | ||
{ | ||
public function meta(): MetaInformation; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.