You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`Uncaught TypeError: OpenAI\Responses\Threads\ThreadResponse::from(): Argument #1 ($attributes) must be of type array, string given, called in /srv/www//public_html/wp-content/plugins//vendor/openai-php/client/src/Resources/Threads.php on line 88 and defined in /srv/www//public_html/wp-content/plugins/**/vendor/openai-php/client/src/Responses/Threads/ThreadResponse.php:46
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
As happens sometimes, the OpenAI API is down but my try/catch method still causes a 500 error coming from the client library.
First I do this to check a thread ID exists.
if not I try to create a new thread, but when the OpenAI API is down this causes the following 500 exception.
`Uncaught TypeError: OpenAI\Responses\Threads\ThreadResponse::from(): Argument #1 ($attributes) must be of type array, string given, called in /srv/www//public_html/wp-content/plugins//vendor/openai-php/client/src/Resources/Threads.php on line 88 and defined in /srv/www//public_html/wp-content/plugins/**/vendor/openai-php/client/src/Responses/Threads/ThreadResponse.php:46
Stack trace:
#0 /srv/www//public_html/wp-content/plugins/*/vendor/openai-php/client/src/Resources/Threads.php(88): OpenAI\Responses\Threads\ThreadResponse::from()
#1 /srv/www//public_html/wp-content/plugins/*/shared_functions.php(147): OpenAI\Resources\Threads->retrieve()
#2 /srv/www/***/public_html/wp-includes/class-wp-hook.php(324): aichat_handle_ajax()
#3 /srv/www/***/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#4 /srv/www/***/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#5 /srv/www/***/public_html/wp-admin/admin-ajax.php(192): do_action()
#6 {main}`
Beta Was this translation helpful? Give feedback.
All reactions