fix codegen timeout
This commit is contained in:
1 parent
300c20714b
commit
bb97a09caa
5 files changed
+44
-5
No files matched your search
@@ -72,6 +72,10 @@ class CodegenClient:
|
||||
raise CodegenError(
|
||||
f"codegen endpoint unreachable at {url}: {exc}. Is your local server running?"
|
||||
) from exc
|
||||
except TimeoutError as exc:
|
||||
raise CodegenError(
|
||||
f"codegen request timed out after {self.timeout}s at {url}"
|
||||
) from exc
|
||||
return payload["choices"][0]["message"]["content"]
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user