Update app.py
Browse files
app.py
CHANGED
@@ -129,7 +129,8 @@ def comment_generate(prompt, history,post_check,full_conv, agent_name=agents[0],
|
|
129 |
)
|
130 |
#history.append((prompt,""))
|
131 |
#formatted_prompt = format_prompt(f"{system_prompt}, {prompt}", history)
|
132 |
-
|
|
|
133 |
client=client_z[0]
|
134 |
|
135 |
stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
|
@@ -178,7 +179,7 @@ def reply_generate(prompt, history,post_check,full_conv, agent_name=agents[0], s
|
|
178 |
)
|
179 |
#history.append((prompt,""))
|
180 |
#formatted_prompt = format_prompt(f"{system_prompt}, {prompt}", history)
|
181 |
-
formatted_prompt = f"{system_prompt}, {prompt}"
|
182 |
client=client_z[0]
|
183 |
|
184 |
stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
|
|
|
129 |
)
|
130 |
#history.append((prompt,""))
|
131 |
#formatted_prompt = format_prompt(f"{system_prompt}, {prompt}", history)
|
132 |
+
#[INST] {message} [/INST]
|
133 |
+
formatted_prompt = f"[INST] {system_prompt}, {prompt} [/INST]"
|
134 |
client=client_z[0]
|
135 |
|
136 |
stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
|
|
|
179 |
)
|
180 |
#history.append((prompt,""))
|
181 |
#formatted_prompt = format_prompt(f"{system_prompt}, {prompt}", history)
|
182 |
+
formatted_prompt = f"[INST] {system_prompt}, {prompt} [/INST]"
|
183 |
client=client_z[0]
|
184 |
|
185 |
stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
|