rafaa commited on
Commit
8f64256
·
verified ·
1 Parent(s): a7aa939

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -10
app.py CHANGED
@@ -93,17 +93,8 @@ def generate(
93
  "Espero que goste de mim. Como posso ajudá-lo hoje?"
94
  ]
95
 
96
- # Add an initial user message
97
- initial_user_message = "Olá, Stella! Como vai hoje?"
98
-
99
- # Construct the prompt without the initial user message for the model
100
- formatted_prompt = format_prompt(initial_user_message, history, system_messages)
101
-
102
- # Send the initial user message to the model and ignore its response
103
- client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
104
-
105
  # Now, use the initial user message along with the system prompt for the rest of the conversation
106
- formatted_prompt = format_prompt(prompt, history, system_messages + [initial_user_message])
107
 
108
  # Continue the conversation and yield the output
109
  stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
 
93
  "Espero que goste de mim. Como posso ajudá-lo hoje?"
94
  ]
95
 
 
 
 
 
 
 
 
 
 
96
  # Now, use the initial user message along with the system prompt for the rest of the conversation
97
+ formatted_prompt = format_prompt(prompt, history, system_messages)
98
 
99
  # Continue the conversation and yield the output
100
  stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)