-
-
Notifications
You must be signed in to change notification settings - Fork 664
Description
Description
Undefined array key "outputs" Error
Description:
An Undefined array key "outputs" error occurs when running the OpenAI PHP client. This issue appears to be related to the response handling in the ThreadRunStepResponseCodeInterpreter.php file.
Error Log:
[2024-05-27 21:55:06] local.ERROR: Undefined array key "outputs" {"userId":1,"exception":"[object] (ErrorException(code: 0): Undefined array key "outputs" at /var/www/html/vendor/openai-php/client/src/Responses/Threads/Runs/Steps/ThreadRunStepResponseCodeInterpreter.php:44)
[stacktrace]
#0 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(255): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
#1 /var/www/html/vendor/openai-php/client/src/Responses/Threads/Runs/Steps/ThreadRunStepResponseCodeInterpreter.php(44): Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}()
#2 /var/www/html/vendor/openai-php/client/src/Responses/Threads/Runs/Steps/ThreadRunStepResponseCodeToolCall.php(43): OpenAI\Responses\Threads\Runs\Steps\ThreadRunStepResponseCodeInterpreter::from()
#3 /var/www/html/vendor/openai-php/client/src/Responses/Threads/Runs/Steps/ThreadRunStepResponseToolCallsStepDetails.php(42): OpenAI\Responses\Threads\Runs\Steps\ThreadRunStepResponseCodeToolCall::from()
#4 [internal function]: OpenAI\Responses\Threads\Runs\Steps\ThreadRunStepResponseToolCallsStepDetails::OpenAI\Responses\Threads\Runs\Steps\{closure}()
#5 /var/www/html/vendor/openai-php/client/src/Responses/Threads/Runs/Steps/ThreadRunStepResponseToolCallsStepDetails.php(40): array_map()
#6 /var/www/html/vendor/openai-php/client/src/Responses/Threads/Runs/Steps/Delta/ThreadRunStepDeltaObject.php(39): OpenAI\Responses\Threads\Runs\Steps\ThreadRunStepResponseToolCallsStepDetails::from()
#7 /var/www/html/vendor/openai-php/client/src/Responses/Threads/Runs/Steps/Delta/ThreadRunStepDeltaResponse.php(40): OpenAI\Responses\Threads\Runs\Steps\Delta\ThreadRunStepDeltaObject::from()
#8 /var/www/html/vendor/openai-php/client/src/Responses/Threads/Runs/ThreadRunStreamResponse.php(63): OpenAI\Responses\Threads\Runs\Steps\Delta\ThreadRunStepDeltaResponse::from()
#9 /var/www/html/vendor/openai-php/client/src/Responses/StreamResponse.php(68): OpenAI\Responses\Threads\Runs\ThreadRunStreamResponse::from()
Environment:
- PHP version: 8.3.6
- OpenAI PHP Client version: v.0.9.2
Please let me know if further information is required or if there are any suggestions to resolve this issue. Thank you!
Steps To Reproduce
Steps to Reproduce:
- Enable the code interpreter on an assistant.
- Ask the assistant to create any file.
- Observe the error log for the
Undefined array key "outputs"message. - If the code interpreter is turned off, everything works perfectly.
OpenAI PHP Client Version
v.0.9.2
PHP Version
8.3.6
Notes
No response