juzeon / poe-openai-proxy

A wrapper that lets you use the reverse-engineered Python library poe-api library as if it was the OpenAI API for ChatGPT. You can connect your favorite OpenAI API based apps to this proxy and enjoy the ChatGPT API for free!
GNU General Public License v3.0
424 stars 98 forks source link

Change timeout policy w/ add auto-recovery #20

Closed ClassicOldSong closed 1 year ago

ClassicOldSong commented 1 year ago

Now it should be more usable, without the need of constant restart after network fluctuations

juzeon commented 1 year ago

Could you please explain why you introduced another timeout config value, and what are the differences between api-timeout and the original timeout? I would appreciate it if you updated the comments in the example config file too.

Also, based on #10, we should set the default timeout value to a higher number.

ClassicOldSong commented 1 year ago

If not differentiated , Poe api willing always timeout before Go api

The default timeout caused a great amount of trouble debugging connectivity issues.

The new timing mechanism won’t timeout whenever there’s a chunk response. So it won’t need a value that high to compensate for the possibility of a very long response.

Usually the first response will come in within 3 secs with the latest Poe-api.

On Mon, Jun 5, 2023 at 3:36 PM 居正 @.***> wrote:

Could you please explain why you introduced another timeout config value, and what are the differences between api-timeout and the original timeout? I would appreciate it if you updated the comments in the example config file too.

Also, based on #10 https://github.com/juzeon/poe-openai-proxy/issues/10, we should set the default timeout value to a higher number.

— Reply to this email directly, view it on GitHub https://github.com/juzeon/poe-openai-proxy/pull/20#issuecomment-1576228194, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACQGQJSDPAZH2EJTVDR4Y6TXJWD7NANCNFSM6AAAAAAY2PF4JQ . You are receiving this because you authored the thread.Message ID: @.***>

ClassicOldSong commented 1 year ago

Correction: Go api will always timeout before Poe-api

On Mon, Jun 5, 2023 at 3:41 PM Yukino Song @.***> wrote:

If not differentiated , Poe api willing always timeout before Go api

The default timeout caused a great amount of trouble debugging connectivity issues.

The new timing mechanism won’t timeout whenever there’s a chunk response. So it won’t need a value that high to compensate for the possibility of a very long response.

Usually the first response will come in within 3 secs with the latest Poe-api.

On Mon, Jun 5, 2023 at 3:36 PM 居正 @.***> wrote:

Could you please explain why you introduced another timeout config value, and what are the differences between api-timeout and the original timeout? I would appreciate it if you updated the comments in the example config file too.

Also, based on #10 https://github.com/juzeon/poe-openai-proxy/issues/10, we should set the default timeout value to a higher number.

— Reply to this email directly, view it on GitHub https://github.com/juzeon/poe-openai-proxy/pull/20#issuecomment-1576228194, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACQGQJSDPAZH2EJTVDR4Y6TXJWD7NANCNFSM6AAAAAAY2PF4JQ . You are receiving this because you authored the thread.Message ID: @.***>

juzeon commented 1 year ago

Thank you. I will merge it now.

juzeon commented 1 year ago

Since you have successfully submitted 3 pull requests, would you like to join this project as a collaborator?

ClassicOldSong commented 1 year ago

At this point it already fits my own needs(sort of). When further needs arise, I might go write my own implementation with a better api backend.

poe-api uses busy waits for all async operations which makes further maintenance very difficult. I don't think I'm willing to invest any more time on it.

But at this time, poe-api is the fastest one since it's the only poe api impl that keeps an active websocket connection.

居正 @.***> 于2023年6月5日周一 19:30写道:

Since you have successfully submitted 3 pull requests, would you like to join this project as a collaborator?

— Reply to this email directly, view it on GitHub https://github.com/juzeon/poe-openai-proxy/pull/20#issuecomment-1576616643, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACQGQJXXHUEHY6RAQYNAJFDXJW7MHANCNFSM6AAAAAAY2PF4JQ . You are receiving this because you authored the thread.Message ID: @.***>

juzeon commented 1 year ago

OK. I understand.