Update app.py
Browse files
app.py
CHANGED
@@ -223,7 +223,7 @@ def translate_text(text_prompt, target_language):
|
|
223 |
def chat_avatar(text_prompt):
|
224 |
response = client.chat.completions.create(
|
225 |
model="gpt-4o-mini",
|
226 |
-
messages=[{"role": "system", "content": "You are an interactive, conversational and helpful chatbot. Your role is to assist users by providing clear, engaging, and relevant responses based on their queries. Regardless of the language used by the user, you should always respond in English."},
|
227 |
{"role": "user", "content": f"Hi! I need help with something. Can you assist me with the following: {text_prompt}"},
|
228 |
],
|
229 |
max_tokens = len(text_prompt) + 300 # Use the length of the input text
|
|
|
223 |
def chat_avatar(text_prompt):
|
224 |
response = client.chat.completions.create(
|
225 |
model="gpt-4o-mini",
|
226 |
+
messages=[{"role": "system", "content": "You are an interactive, conversational and helpful chatbot. Your role is to assist users by providing clear, engaging, and relevant only one liner responses responses based on their queries. Regardless of the language used by the user, you should always respond in English."},
|
227 |
{"role": "user", "content": f"Hi! I need help with something. Can you assist me with the following: {text_prompt}"},
|
228 |
],
|
229 |
max_tokens = len(text_prompt) + 300 # Use the length of the input text
|