format code

This commit is contained in:
grillazz
2025-05-03 08:47:28 +02:00
parent 61ba8cc12c
commit 6f2db272c4
2 changed files with 7 additions and 8 deletions

View File

@@ -14,7 +14,9 @@ async def chat_with_endpoint():
print("\nModel: ", end="", flush=True)
try:
async with client.stream("POST", API_URL, data={"prompt": prompt}, timeout=60) as response:
async with client.stream(
"POST", API_URL, data={"prompt": prompt}, timeout=60
) as response:
async for chunk in response.aiter_lines():
if not chunk:
continue
@@ -28,4 +30,4 @@ async def chat_with_endpoint():
if __name__ == "__main__":
anyio.run(chat_with_endpoint)
anyio.run(chat_with_endpoint)