feat: add openai compatibility support for google gemini #801
Annotations
10 errors and 4 warnings
Type Checks:
src/Responses/Chat/CreateResponse.php#L53
Offset 'id' on array{id: string, object: string, created: int, model: string, system_fingerprint?: string, choices: array<int, array{index: int, message: array{role: string, content: string|null, function_call: array{name: string, arguments: string}|null, tool_calls: array<int, array{id: string, type: string, function: array{name: string, arguments: string}}>|null}, finish_reason: string|null}>, usage: array{prompt_tokens: int, completion_tokens: int|null, total_tokens: int, prompt_tokens_details?: array{cached_tokens: int}, completion_tokens_details?: array{audio_tokens?: int, reasoning_tokens: int, accepted_prediction_tokens: int, rejected_prediction_tokens: int}}} on left side of ?? always exists and is not nullable.
|
Type Checks:
src/Responses/Chat/CreateResponse.php#L59
Offset 'usage' on array{id: string, object: string, created: int, model: string, system_fingerprint?: string, choices: array<int, array{index: int, message: array{role: string, content: string|null, function_call: array{name: string, arguments: string}|null, tool_calls: array<int, array{id: string, type: string, function: array{name: string, arguments: string}}>|null}, finish_reason: string|null}>, usage: array{prompt_tokens: int, completion_tokens: int|null, total_tokens: int, prompt_tokens_details?: array{cached_tokens: int}, completion_tokens_details?: array{audio_tokens?: int, reasoning_tokens: int, accepted_prediction_tokens: int, rejected_prediction_tokens: int}}} in isset() always exists and is not nullable.
|
Type Checks:
src/Responses/Chat/CreateResponse.php#L69
Method OpenAI\Responses\Chat\CreateResponse::toArray() should return array{id: string, object: string, created: int, model: string, system_fingerprint?: string, choices: array<int, array{index: int, message: array{role: string, content: string|null, function_call?: array{name: string, arguments: string}, tool_calls?: array<int, array{id: string, type: string, function: array{name: string, arguments: string}}>}, finish_reason: string|null}>, usage: array{prompt_tokens: int, completion_tokens: int|null, total_tokens: int}} but returns array{id?: string, object: string, created: int, model: string, system_fingerprint?: string, choices: array<int, array{index: int, message: array{role: string, content: string|null, function_call?: array{name: string, arguments: string}, tool_calls?: array<int, array{id: string, type: string, function: array{name: string, arguments: string}}>}, finish_reason: string|null}>, usage: array{prompt_tokens: int, completion_tokens: int|null, total_tokens: int, prompt_tokens_details?: array{cached_tokens: int}}}.
|
Type Checks:
src/Responses/Chat/CreateResponse.php#L79
Cannot call method toArray() on OpenAI\Responses\Chat\CreateResponseUsage|null.
|
Type Checks:
src/Responses/Chat/CreateStreamedResponse.php#L47
Offset 'id' on array{id: string, object: string, created: int, model: string, choices: array<int, array{index: int, delta: array{role?: string, content?: string}, finish_reason: string|null}>, usage?: array{prompt_tokens: int, completion_tokens: int|null, total_tokens: int}} on left side of ?? always exists and is not nullable.
|
Type Checks:
src/Responses/Chat/CreateStreamedResponse.php#L76
Method OpenAI\Responses\Chat\CreateStreamedResponse::toArray() should return array{id: string, object: string, created: int, model: string, choices: array<int, array{index: int, delta: array{role?: string, content: null, function_call: array{name?: string, arguments?: string}}|array{role?: string, content?: string}, finish_reason: string|null}>, usage?: array{prompt_tokens: int, completion_tokens: int|null, total_tokens: int}} but returns array{id: string|null, object: string, created: int, model: string, choices: array<int, array{index: int, delta: array{role?: string, content: null, function_call: array{name?: string, arguments?: string}}|array{role?: string, content?: string}, finish_reason: string|null}>, usage?: array{prompt_tokens: int, completion_tokens: int|null, total_tokens: int, prompt_tokens_details?: array{cached_tokens: int}}}.
|
Type Checks:
src/Responses/Embeddings/CreateResponse.php#L51
Offset 'usage' on array{object: string, data: array<int, array{object: string, embedding: array<int, float>, index: int}>, usage: array{prompt_tokens: int, total_tokens: int}} in isset() always exists and is not nullable.
|
Type Checks:
src/Responses/Embeddings/CreateResponse.php#L67
Cannot call method toArray() on OpenAI\Responses\Embeddings\CreateResponseUsage|null.
|
Type Checks:
src/Responses/Embeddings/CreateResponseEmbedding.php#L25
Offset 'index' on array{object: string, index: int, embedding: array<int, float>} on left side of ?? always exists and is not nullable.
|
Type Checks:
src/Responses/Embeddings/CreateResponseEmbedding.php#L35
Method OpenAI\Responses\Embeddings\CreateResponseEmbedding::toArray() should return array{object: string, index: int, embedding: array<int, float>} but returns array{object: string, index: int|null, embedding: array<int, float>}.
|
Your workflow is using a version of actions/cache that is scheduled for deprecation, actions/cache@v1. Please update your workflow to use the latest version of actions/cache to avoid interruptions. Learn more: https://github.blog/changelog/2024-09-16-notice-of-upcoming-deprecations-and-changes-in-github-actions-services/
|
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/cache@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v2, actions/cache@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
Setup PHP
Skipping prestissimo, as it does not support Composer . Specify composer:v1 in tools to use prestissimo
|
Loading