diff --git a/python/dify_plugin/interfaces/model/openai_compatible/llm.py b/python/dify_plugin/interfaces/model/openai_compatible/llm.py index 34135350..4bac745f 100644 --- a/python/dify_plugin/interfaces/model/openai_compatible/llm.py +++ b/python/dify_plugin/interfaces/model/openai_compatible/llm.py @@ -482,10 +482,11 @@ def _generate( if user: data["user"] = user + headers['Content-Type'] = 'application/json; charset=utf-8' response = requests.post( endpoint_url, headers=headers, - json=data, + data=json.dumps(data, ensure_ascii=False).encode('utf-8'), timeout=(10, _plugin_config.MAX_REQUEST_TIMEOUT), stream=stream, )