Spaces:
Sleeping
Sleeping
lukestanley
commited on
Commit
•
3c6c618
1
Parent(s):
1dba83c
Add TODO for Runpod timeout handling
Browse files
utils.py
CHANGED
@@ -176,6 +176,8 @@ def llm_stream_serverless(prompt,model):
|
|
176 |
assert response.status_code == 200, f"Unexpected RunPod API status code: {response.status_code} with body: {response.text}"
|
177 |
result = response.json()
|
178 |
print(result)
|
|
|
|
|
179 |
output = result['output'].replace("model:mixtral-8x7b-instruct-v0.1.Q4_K_M.gguf\n", "")
|
180 |
# TODO: remove replacement once new version of runpod is deployed
|
181 |
return json.loads(output)
|
|
|
176 |
assert response.status_code == 200, f"Unexpected RunPod API status code: {response.status_code} with body: {response.text}"
|
177 |
result = response.json()
|
178 |
print(result)
|
179 |
+
# TODO: After a 30 second timeout, a job ID is returned in the response instead,
|
180 |
+
# and the client must poll the job status endpoint to get the result.
|
181 |
output = result['output'].replace("model:mixtral-8x7b-instruct-v0.1.Q4_K_M.gguf\n", "")
|
182 |
# TODO: remove replacement once new version of runpod is deployed
|
183 |
return json.loads(output)
|