Spaces:
Sleeping
Sleeping
update
Browse files- llm/deepinfra_api.py +3 -5
llm/deepinfra_api.py
CHANGED
@@ -146,8 +146,6 @@ class DeepInfraApi(LlmApi):
|
|
146 |
"""
|
147 |
async with httpx.AsyncClient() as client:
|
148 |
request = await self.create_request(prompt)
|
149 |
-
|
150 |
-
|
151 |
-
response
|
152 |
-
if response.status_code == 200:
|
153 |
-
return response.json()["choices"][0]["message"]["content"]
|
|
|
146 |
"""
|
147 |
async with httpx.AsyncClient() as client:
|
148 |
request = await self.create_request(prompt)
|
149 |
+
response = await client.post(f"{self.params.url}/v1/openai/chat/completions", headers=super().create_headers(), json=request)
|
150 |
+
if response.status_code == 200:
|
151 |
+
return response.json()["choices"][0]["message"]["content"]
|
|
|
|