hotfix/server: add follow_redirect on modal

This commit is contained in:
2023-11-02 19:09:13 +01:00
parent 3424550ea9
commit c87c30d339
4 changed files with 4 additions and 0 deletions

View File

@@ -47,6 +47,7 @@ class ModalLLM(LLM):
json=json_payload, json=json_payload,
timeout=self.timeout, timeout=self.timeout,
retry_timeout=60 * 5, retry_timeout=60 * 5,
follow_redirects=True,
) )
response.raise_for_status() response.raise_for_status()
text = response.json()["text"] text = response.json()["text"]

View File

@@ -28,6 +28,7 @@ class AudioDiarizationModalProcessor(AudioDiarizationProcessor):
headers=self.headers, headers=self.headers,
params=params, params=params,
timeout=None, timeout=None,
follow_redirects=True,
) )
response.raise_for_status() response.raise_for_status()
return response.json()["text"] return response.json()["text"]

View File

@@ -41,6 +41,7 @@ class AudioTranscriptModalProcessor(AudioTranscriptProcessor):
timeout=self.timeout, timeout=self.timeout,
headers=self.headers, headers=self.headers,
params=json_payload, params=json_payload,
follow_redirects=True,
) )
self.logger.debug( self.logger.debug(

View File

@@ -50,6 +50,7 @@ class TranscriptTranslatorProcessor(Processor):
headers=self.headers, headers=self.headers,
params=json_payload, params=json_payload,
timeout=self.timeout, timeout=self.timeout,
follow_redirects=True,
) )
response.raise_for_status() response.raise_for_status()
result = response.json()["text"] result = response.json()["text"]