利用 AI 大模型和自动化工作流,根据主题或关键词一键生成高清短视频。Generate HD short videos from a topic or keyword with an automated AI workflow.
Python ai-video-generatorcontent-creationffmpeginstagram-reelsllmpythonshort-videosubtitlestext-to-speechtiktokvideo-automationvideo-workflowworkflow-automationyoutube-shorts
🎨 style: format llm.py code
yyhhyyyyyyc4586d37f517
diff --git a/app/services/llm.py b/app/services/llm.pyindex 5b3baa79..2c45ef97 100644--- a/app/services/llm.py+++ b/app/services/llm.py@@ -179,7 +179,10 @@ def _generate_response(prompt: str) -> str:headers={"Authorization": f"Bearer {api_key}"},json={"messages": [- {"role": "system", "content": "You are a friendly assistant"},+ {+ "role": "system",+ "content": "You are a friendly assistant",+ },{"role": "user", "content": prompt},]},@@ -197,7 +200,9 @@ def _generate_response(prompt: str) -> str:"client_secret": secret_key,}access_token = (- requests.post("https://aip.baidubce.com/oauth/2.0/token", params=params)+ requests.post(+ "https://aip.baidubce.com/oauth/2.0/token", params=params+ ).json().get("access_token"))