Spaces:
Sleeping
Sleeping
Update api.py
Browse files
api.py
CHANGED
@@ -293,10 +293,9 @@ memory.add("μν λ³΄λ¬ κ°λ€κ° μΉκ΅¬λ μΈμ μ΄")
|
|
293 |
memory.add("μΉ΄νμμ 곡λΆνλλ° μ§μ€μ΄ μ λμ΄")
|
294 |
|
295 |
def merge_prompt_with_memory(prompt: str, memories: list):
|
296 |
-
context = "\n".join(f"
|
297 |
return f"{context} {prompt}"
|
298 |
|
299 |
-
|
300 |
def mismatch_tone(input_text, output_text):
|
301 |
if "γ
γ
" in input_text and not re.search(r'γ
γ
|γ
|μ¬λ°|λ|λ§λ|λ§μ§|μ¬ν', output_text):
|
302 |
return True
|
|
|
293 |
memory.add("μΉ΄νμμ 곡λΆνλλ° μ§μ€μ΄ μ λμ΄")
|
294 |
|
295 |
def merge_prompt_with_memory(prompt: str, memories: list):
|
296 |
+
context = "\n".join(f"{mem}" for mem in memories)
|
297 |
return f"{context} {prompt}"
|
298 |
|
|
|
299 |
def mismatch_tone(input_text, output_text):
|
300 |
if "γ
γ
" in input_text and not re.search(r'γ
γ
|γ
|μ¬λ°|λ|λ§λ|λ§μ§|μ¬ν', output_text):
|
301 |
return True
|