Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: update text_to_audio method to send data as JSON (#20663)

minglu7837f76996093
diff --git a/sdks/python-client/dify_client/client.py b/sdks/python-client/dify_client/client.py
index ee1b5c57e1d..d885dc6fb76 100644
--- a/sdks/python-client/dify_client/client.py
+++ b/sdks/python-client/dify_client/client.py
@@ -47,7 +47,7 @@ class DifyClient:
def text_to_audio(self, text: str, user: str, streaming: bool = False):
data = {"text": text, "user": user, "streaming": streaming}
- return self._send_request("POST", "/text-to-audio", data=data)
+ return self._send_request("POST", "/text-to-audio", json=data)
def get_meta(self, user):
params = {"user": user}