Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -131,8 +131,8 @@ def generate(prompt, history, agent_name=agents[0], sys_prompt="", temperature=0
|
|
131 |
if prompt.startswith(' \"'):
|
132 |
prompt=prompt.strip(' \"')
|
133 |
formatted_prompt = format_prompt(f"{system_prompt}, {prompt}", history)
|
134 |
-
if len(formatted_prompt) < (
|
135 |
-
|
136 |
stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
|
137 |
output = ""
|
138 |
#if history:
|
|
|
131 |
if prompt.startswith(' \"'):
|
132 |
prompt=prompt.strip(' \"')
|
133 |
formatted_prompt = format_prompt(f"{system_prompt}, {prompt}", history)
|
134 |
+
if len(formatted_prompt) < (10000):
|
135 |
+
print(len(formatted_prompt))
|
136 |
stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
|
137 |
output = ""
|
138 |
#if history:
|