mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
hotfix/server: add follow_redirect on modal
This commit is contained in:
@@ -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"]
|
||||||
|
|||||||
@@ -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"]
|
||||||
|
|||||||
@@ -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(
|
||||||
|
|||||||
@@ -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"]
|
||||||
|
|||||||
Reference in New Issue
Block a user