Spaces:
Sleeping
Sleeping
lukestanley
commited on
Commit
•
811e485
1
Parent(s):
d641f9a
Removes unused code
Browse files
utils.py
CHANGED
@@ -47,8 +47,6 @@ def llm_streaming(prompt:str, pydantic_model_class, return_pydantic_object=False
|
|
47 |
if new_token:
|
48 |
output_text = output_text + new_token
|
49 |
print(new_token,sep='',end='',flush=True)
|
50 |
-
#else:
|
51 |
-
# raise Exception(f"Parse error, expecting stream:{str(chunk)}")
|
52 |
|
53 |
if return_pydantic_object:
|
54 |
model_object = pydantic_model_class.model_validate_json(output_text)
|
|
|
47 |
if new_token:
|
48 |
output_text = output_text + new_token
|
49 |
print(new_token,sep='',end='',flush=True)
|
|
|
|
|
50 |
|
51 |
if return_pydantic_object:
|
52 |
model_object = pydantic_model_class.model_validate_json(output_text)
|