From de887340ed58163640503867e6b6d65ca6211f1b Mon Sep 17 00:00:00 2001 From: Zhijie He Date: Sat, 8 Jun 2024 22:39:16 +0800 Subject: [PATCH] set utf8 encode for data, fix non english char cause 500 error --- searx/engines/cloudflareai.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searx/engines/cloudflareai.py b/searx/engines/cloudflareai.py index def5d0ac5..fb77e46c4 100644 --- a/searx/engines/cloudflareai.py +++ b/searx/engines/cloudflareai.py @@ -39,7 +39,7 @@ def request(query, params): { 'role': 'system', 'content': cf_ai_model_system }, { 'role': 'user', 'content': params['query'] } ] - }) + }).encode('utf-8') return params