Commit e8df2b75 authored by John Wang's avatar John Wang

fix: <|xxx|> raise error

parent e51c9ff1
import logging
import re
from typing import Optional, List, Union, Tuple
from langchain.base_language import BaseLanguageModel
......@@ -270,6 +271,9 @@ And answer according to the language of the user's question.
messages.append(human_message)
for message in messages:
message.content = re.sub(r'<\|.*?\|>', '', message.content)
return messages, ['\nHuman:', '</histories>']
@classmethod
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment