diff --git a/flask_drop_rewrite_request.py b/flask_drop_rewrite_request.py index 6e51dbc..5228642 100644 --- a/flask_drop_rewrite_request.py +++ b/flask_drop_rewrite_request.py @@ -511,7 +511,7 @@ def english_ulit(sentence): if_change = True # 判断句子长度 if sentence != "": - if sentence[-1] != ".": + if sentence[-1] == ".": text = f"<|im_start|>user\nRewrite the following sentence fragment, ensuring that the meaning remains similar but with significant changes. The length of the rewritten sentence must be greater, not less. Additionally, the words in the short sentences must connect seamlessly with the preceding and following sentences:\n{sentence}<|im_end|>\n<|im_start|>assistant\n" else: text = f"<|im_start|>user\nRewrite the following sentence, requiring the meaning to be similar but the change to be larger, and the number of words can only be more but not less:\n{sentence}<|im_end|>\n<|im_start|>assistant\n" @@ -529,7 +529,7 @@ def chinese_ulit(sentence): # 判断句子长度 if len(sentence) > 9: - if sentence[-1] != "。": + if sentence[-1] == "。": text = f"<|im_start|>user\n任务:改写句子\n改写下面半这句话,要求意思接近但是改动幅度比较大,字数只能多不能少,短句前后词跟上下句衔接不能有错误:\n{sentence}<|im_end|>\n<|im_start|>assistant\n" else: text = f"<|im_start|>user\n任务:改写句子\n改写下面这句话,要求意思接近但是改动幅度比较大,字数只能多不能少:\n{sentence}<|im_end|>\n<|im_start|>assistant\n"