Spaces:
Sleeping
Sleeping
Update utils.py
Browse files
utils.py
CHANGED
|
@@ -160,9 +160,8 @@ def translate_to_english(llm, user_query):
|
|
| 160 |
|
| 161 |
def translate(llm, user_query, to_translate):
|
| 162 |
sys_prompt = """
|
| 163 |
-
You are an AI assistant that determines the language
|
| 164 |
-
Do not generate any irrelavant text, only return the translation.
|
| 165 |
-
If the user query is in English, then don't do anything just return the original text, no translation is required there.""".format(user_query)
|
| 166 |
|
| 167 |
messages = [
|
| 168 |
(
|
|
|
|
| 160 |
|
| 161 |
def translate(llm, user_query, to_translate):
|
| 162 |
sys_prompt = """
|
| 163 |
+
You are an AI assistant that determines the language of the following text - {} and translate the user provided text in that language. \
|
| 164 |
+
Do not generate any irrelavant text, only return the translation.""".format(user_query)
|
|
|
|
| 165 |
|
| 166 |
messages = [
|
| 167 |
(
|