Open lilian-lilifox opened 2 months ago
Before calling OpenAIChangeBaseURL()
it seems to be correct:
Its not here exactly...must be somewhere behind...
The baseurl in OpenAI_t openai
didn't go wrong. I think there might be some mistakes with functions dealing with dns requests.
I founded that I should add a slash and the end of the url like this: https://api.chatanywhere.tech/
. Then it will request https://api.chatanywhere.tech/audio/speech/
, and dramatically my origin doesn't support this request.
So, the example https://api.chatanywhere.tech/ requires a / to work, but your source does not support adding a /, correct? Is my understanding accurate? Do you have to use this source? Maybe you could try a different source, and I will investigate why this issue occurred on my end.
@Horion0415 This chatgpt demo send our voice directly to openai. GPT deals with audio then response text. And the response text will be transverse to speech by tts.
To use the audio service of openai, it requests https://baseurl/
(set by us)+ audio/speech/
(implicit by openai api). Some of the third party source doesn't support the audio service.
I think I will try a different source.
Okay, I understand. In fact, I have found that there are often issues when using ChatAnywhere, and we will try to resolve this problem later. In the meantime, you can try using other sources for testing.
For the region policy, I could not use the offical service. Another solution is,stt + gpt(text) + tts . We can use Speech to Text first, then request gpt in text. This is a more general way, however may lead to longer response time and lower accuracy.
Checklist
How often does this bug occurs?
always
Expected behavior
I have set the base_url as:
https://api.chatanywhere.tech
, which tested valid on lobechat.com with the apikey.Actual behavior (suspected bug)
It connected to wifi successfully, but when asking questions it gives the fallback of
invalid_request_error
, and i found the DNS incorrect. As the log described,dns_enqueue: "api.chatanywhere.techaudio": use DNS entry 0
,dns_recv: "api.chatanywhere.techaudio": error in flags
, an unexpectedaudio
was added.Error logs or terminal output