Openhab ChatGPT: HTTP Timeout


I am using chatGPT in my openhab 4.1.1 and I want to try to get some (longer) text results.
In 90% of my calls I always get an empty result - resp. no result into my string variable.

I turned on now my logs to TRACE for ChatGPT and now it writes down:

2024-01-20 19:26:35.074 [DEBUG] [ding.chatgpt.internal.ChatGPTHandler] - Request to OpenAI failed: Total timeout 10000 ms elapsed
java.util.concurrent.TimeoutException: Total timeout 10000 ms elapsed
at org.eclipse.jetty.client.HttpConnection$RequestTimeouts.onExpired( ~[?:?]
at org.eclipse.jetty.client.HttpConnection$RequestTimeouts.onExpired( ~[?:?]
at ~[?:?]
at$100( ~[?:?]
at$Timeouts.onTimeoutExpired( ~[?:?]
at$ ~[?:?]
at java.util.concurrent.Executors$ ~[?:?]
at [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker( [?:?]
at java.util.concurrent.ThreadPoolExecutor$ [?:?]
at [?:?]

Could it be necessary to increase the timeout in my http.cfg?
I did not configure any timeout there. At least from the standard documentation it says something about 5000msec. So I have no clue where these 10.000msec come from.

Any Ideas? Thx for your support

I made some more tests.

1.) Changes in http.cfg do not change anything. even if I set timeout to 11000msec, the logfile of chatgpt binding says: timeout 10000 => seems that this timeout comes from somewhere else?

2.) If I just “ask” a short question or give chatgpt a short input, then the reply works. for example “Answer in 2-3 sentences”. So the basic functionallity obviously works, but I did not find out yet where I can overwrite the timeout of 10000msec. any Ideas?

I found a temporary workaround:
1.) i am using curl-chatgpt (from github) on my command line (Linux crontab) and create an output-file every x minutes
2.) in my openhab rule I import the textfile and make a postupdate to a String variable

so finally, I do not need the chatgpt Plugin for larger texts which need more than the (wherever configured…?) timeout of 10000msec

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.