### Start Stock Analysis API Service Source: https://context7.com/wwwzhouhui/dify-for-dsl/llms.txt Navigate to the stock analysis API directory and install dependencies. Then, run the Uvicorn server to start the service on port 8085. ```bash cd dsl/akshare pip install -r requirements.txt uvicorn stock_analysis_api:app --host 0.0.0.0 --port 8085 ``` -------------------------------- ### Install Dependencies Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/py/geekaiapp/tts1/README.md Navigate to the tts1 directory and install the required Python packages using pip. ```bash cd geekaiapp/tts1 pip install -r requirements.txt ``` -------------------------------- ### Start the LaTeX to Word Application Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/py/geekaiapp/laTex1/README.md Navigate to the application directory and run the main Python script to start the Gradio web server. ```bash cd geekaiapp/laTex1 python latex_gradio.py ``` -------------------------------- ### Set up logging Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/py/readme.txt Configures basic logging to INFO level and gets a logger instance. ```python logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) ``` -------------------------------- ### Configuration File Example Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/dsl/story/readme.md Example of the config.ini file, detailing common, LLM, voice, server, and authentication settings. Ensure API keys and base URLs are correctly configured for your chosen LLM providers. ```ini [common] region = xxxx secret_id = xxxx secret_key = xxx bucket = xxx [llm] text_llm_provider = intern text_llm_model = internlm3-latest image_llm_provider = siliconflow image_llm_model = black-forest-labs/FLUX.1-schnell openai_base_url = https://api.openai.com/v1 aliyun_base_url = https://dashscope.aliyuncs.com/compatible-mode/v1 deepseek_base_url = https://api.deepseek.com/v1 ollama_base_url = http://localhost:11434/v1 siliconflow_base_url = https://api.siliconflow.cn/v1 intern_base_url = https://chat.intern-ai.org.cn/api/v1 openai_api_key = "" ali_api_key = "" deepseek_api_key = "" ollama_api_key = "" siliconflow_api_key = sk-xxxxx intern_api_key = [voice] voice_name = zh-CN-XiaoxiaoNeural voice_rate = 1.0 [server] host = 127.0.0.1 port = 8000 [auth] valid_tokens = ["zhouhui-1258720xxxx"] ``` -------------------------------- ### Install Dependencies Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/mcp/FastMCP/readme.md Navigate to the project directory and install all required Python packages using pip. It's recommended to use a specific mirror for faster downloads. ```shell cd F:\work\code\2025dify-dsl\dify-for-dsl\mcp\FastMCP pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/ ``` -------------------------------- ### Start Service Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/dsl/story/readme.md Command to start the Dify Story DSL service. Ensure the configuration file is correctly set up before running. ```bash python main.py ``` -------------------------------- ### Start HiDream-E1 Server Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/dsl/difyforgitee/HiDream-E1说明.md Execute this command in the terminal to start the HiDream-E1 server. ```shell python giteeapiforall.py ``` -------------------------------- ### File Upload Example Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/py/geekaiapp/readme.md Demonstrates how to upload a file using multipart/form-data. Replace 'test.jpg' with your file name. ```bash curl -F "file=@test.jpg" http://your-api-domain/api/upload ``` -------------------------------- ### Install Dependencies Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/py/geekaiapp/beartAIfaceswap1/README.md Installs all necessary Python packages for the BeArt AI Face Swap system. Ensure you have a requirements.txt file in your project directory. ```bash pip install -r requirements.txt ``` -------------------------------- ### Dify Plugin Development for Qwen-Image Text-to-Image Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/README.md This guide focuses on zero-code Dify plugin development, primarily for text-to-image generation using Qwen-Image. Refer to SK47/qwen_text2image for Dify plugin code examples. ```yml 零代码搞定 DIFY 插件开发主要是基于qwen-image文生图,dify插件代码参考https://github.com/SK47/qwen_text2image 项目 ``` -------------------------------- ### Example Markdown Input Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/py/geekaiapp/markdown2map/README.md This is an example of Markdown syntax supported by the tool, including headings, lists, and detailed content. ```markdown # 主题 ## 子主题1 ### 详细内容1 - 要点1 - 要点2 ## 子主题2 ### 详细内容2 - 要点3 - 要点4 ``` -------------------------------- ### Install markmap-cli Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/py/geekaiapp/markdown2map/README.md Install the markmap-cli globally using npm. This tool is required for converting Markdown to mindmaps. ```bash npm install -g markmap-cli ``` -------------------------------- ### Start MCP Server Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/mcp/FastMCP/readme.md Execute the main server script to launch the FastMCP service. This command starts the server, making it available for client connections. ```shell python doubao_mcp_ai_server2.py ``` -------------------------------- ### Start Jimeng Video Generation Service Source: https://context7.com/wwwzhouhui/dify-for-dsl/llms.txt Ensure the `config.ini` file is correctly configured with your Tencent Cloud credentials and Jimeng API details. Then, start the Uvicorn server for the video generation service on port 8088. ```bash uvicorn jimeng_video_service:app --host 0.0.0.0 --port 8088 ``` -------------------------------- ### Start Student Score Query API Service Source: https://context7.com/wwwzhouhui/dify-for-dsl/llms.txt Install dependencies and run the FastAPI service for querying student scores. This service operates on port 9090. ```bash # Configure .env file # DATABASE_URL=postgresql://user:password@localhost:5432/student_db # Start the service cd dsl/db/student pip install -r requirements.txt uvicorn score_api:app --host 0.0.0.0 --port 9090 ``` -------------------------------- ### Install Dependencies Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/dsl/story/readme.md Installs required Python packages using pip. It's recommended to use Python 3.10+. ```bash pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/ ``` -------------------------------- ### Start HTML Generation and Upload Service Source: https://context7.com/wwwzhouhui/dify-for-dsl/llms.txt Navigate to the HTML generation directory and start the Uvicorn server on port 8088. This service handles saving generated HTML content to COS. ```bash cd dsl/makehtml uvicorn makehtmlapi:app --host 0.0.0.0 --port 8088 ``` -------------------------------- ### Configuration File Example Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/dsl/difyforsiliconflow/bizyair/reademe.md This INI file defines default settings for output paths, workflow files, ComfyUI endpoint, and cloud storage credentials. ```ini [DEFAULT] output_path = D:\\工作临时\\2025\\1月\\2025年1月20日\\output #output_path = /home/python/difyforgitee/pictures workflowfile= D:\\工作临时\\2025\\1月\\2025年1月17日\\workflow_api111.json #workflowfile= /home/python/difyforgitee/workflow_api111.json comfyui_endpoit=192.168.1.13:8188 region = ap-nanjing 腾讯云OSS存储Region secret_id = xxxxxx 腾讯云OSS存储SecretId secret_key = xxxxx 腾讯云OSS存储SecretKey bucket = dify-1258720957 腾讯云OSS存储bucket ``` -------------------------------- ### Install Dependencies for AI News Crawler Source: https://context7.com/wwwzhouhui/dify-for-dsl/llms.txt Navigate to the crawl4ai directory and install the required Python packages for the AI news crawling service. ```bash # Install dependencies cd dsl/crawl4ai pip install -r requirements.txt ``` -------------------------------- ### Troubleshoot: Pandoc Not Found Error Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/py/geekaiapp/laTex1/README.md If Pandoc is not found, ensure it is installed and accessible in your system's PATH environment variable. ```text 错误: 未找到Pandoc 解决: 安装Pandoc并确保在PATH中 ``` -------------------------------- ### Start Gradio Application Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/py/geekaiapp/markdown2map/README.md Run the Gradio application using the provided Python script. This command starts the web interface for the Markdown to Mindmap converter. ```bash python marp1_gradio.py ``` -------------------------------- ### Start Gradio Visual Interface Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/py/geekaiapp/tts1/README.md Run the Gradio application to access the web-based TTS interface. The service will be available at http://localhost:16003. ```bash python tts1_gradio.py ``` -------------------------------- ### Run FastAPI Application Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/dsl/difyforgitee/dify中创建并使用自定义工具-gitee绘画.md Starts the FastAPI application using uvicorn. This is the standard way to run a FastAPI application in production or for development. ```python if __name__ == "__main__": import uvicorn uvicorn.run(app, host="0.0.0.0", port=8081) ``` -------------------------------- ### Project Dependencies Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/dsl/difyforgitee/dify中创建并使用自定义工具-gitee绘画.md Lists the Python packages required for the project. These should be installed using pip. ```text uvicorn== 0.34.0 fastapi== 0.115.6 cos-python-sdk-v5==1.9.33 ``` -------------------------------- ### Run the Application Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/py/geekaiapp/beartAIfaceswap1/README.md Launches the BeArt AI Face Swap Gradio application. The application will be accessible at http://localhost:16001. ```bash python bf_gradio.py ``` -------------------------------- ### 进入容器 Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/py/fapiao/README.md 通过 bash 进入正在运行的 Docker 容器,以便进行调试或执行命令。 ```bash # 进入容器 docker exec -it fapiaosqd-web bash ``` -------------------------------- ### 查看容器状态 Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/py/fapiao/README.md 检查正在运行的 Docker 容器的状态。 ```bash # 查看容器状态 docker ps ``` -------------------------------- ### Configure Cherry Studio Client Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/mcp/FastMCP/readme.md Set up Cherry Studio to connect to the MCP server. This involves adding a new server configuration, selecting 'sse' as the type, and providing the correct URL. ```json { "doubao_mcp_ai_server": { "url": "http://127.0.0.1:8002/sse", "headers": {}, "timeout": 60, "sse_read_timeout": 300 } } ``` -------------------------------- ### 直接使用 Docker 运行 Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/py/fapiao/README.md 直接运行 Docker 容器,并配置必要的目录挂载和端口映射。适用于快速启动或独立运行。 ```bash # 创建必要的目录 mkdir -p uploads exports # 运行容器 docker run -d \ --name fapiaosqd-web \ -p 15601:15601 \ -v $(pwd)/uploads:/app/uploads \ -v $(pwd)/exports:/app/exports \ --restart unless-stopped \ wwwzhouhui569/fapiaosqd:latest ``` -------------------------------- ### 构建 Docker 镜像 Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/py/fapiao/README.md 使用此命令构建项目的 Docker 镜像。确保在包含 Dockerfile 的项目根目录下运行。 ```bash # 构建镜像 docker build -t fapiaosqd:latest . ``` -------------------------------- ### Dify Workflow for Building an Intelligent Mind Map System Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/README.md This practical tutorial demonstrates how to build an intelligent mind map system in 5 minutes using Dify and the MCP tool. ```yml 5分钟搭建智能思维导图系统!Dify + MCP工具实战教程.yml ``` -------------------------------- ### Get History from Server Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/py/readme.txt Fetches the processing history for a given prompt ID from the server. It makes an HTTP GET request to the server's history endpoint. Requires `server_address` to be defined globally. ```python def get_history(prompt_id): with urllib.request.urlopen(f"http://{server_address}/history/{prompt_id}") as response: return json.loads(response.read()) ``` -------------------------------- ### 更新镜像 Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/py/fapiao/README.md 拉取最新的 Docker 镜像并重新部署服务。 ```bash # 更新镜像 docker-compose pull docker-compose up -d ``` -------------------------------- ### 配置客户端认证头 Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/dsl/jimeng/即梦文生视频逆向接口部署使用.md 在客户端代码中,需要设置Authorization请求头,其值应与服务端config.ini配置文件中的自定义秘钥保持一致,以进行身份验证。 ```python # 添加认证头 headers = { "Authorization": "Bearer sk-zhouhui11111", # 替换为实际的认证token "Content-Type": "application/json" } ``` -------------------------------- ### Enable Debug Logging Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/py/geekaiapp/laTex1/README.md To get more detailed logs for debugging, configure the logging level to DEBUG. ```python import logging logging.basicConfig(level=logging.DEBUG) ``` -------------------------------- ### Initialize Global Variables Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/py/yewu2videoaddsrt/templates/index.html Initializes global variables for storing file paths. `window.audio_file` stores the temporary location of uploaded audio/video files, and `window.video_url` stores the server's temporary storage location for uploaded videos. ```javascript window.audio_file = null; // 上传视频后服务器返回的临时存储位置 window.video_url = null; ``` -------------------------------- ### Start FastAPI API Service Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/py/geekaiapp/tts1/README.md Run the FastAPI application to expose the TTS functionality as an API. The service will be available at http://localhost:16003. ```bash python tts1_jiekou.py ``` -------------------------------- ### Dify Workflow for Generating System Architecture Diagrams with Kimi-K2 and Mermaid Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/README.md This workflow uses Kimi-K2 and Mermaid to generate system architecture diagrams with a single click, making it easy for beginners to understand. ```yml 用Kimi-K2+Mermaid 神器,一键生成系统架构图!小白也能秒会.yml ``` -------------------------------- ### Start AI News Crawling Service Source: https://context7.com/wwwzhouhui/dify-for-dsl/llms.txt Run the FastAPI service for crawling AI news from aibase.com. This service operates on port 8086. ```bash # Start the service uvicorn aibase_craw4fastapi:app --host 0.0.0.0 --port 8086 ``` -------------------------------- ### 重启服务 Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/py/fapiao/README.md 使用 Docker Compose 重启所有定义的服务。 ```bash # 重启服务 docker-compose restart ``` -------------------------------- ### Add Python Dependencies to Sandbox Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/README.md Modify the docker-compose.yaml file to include a python-requirements.txt file for installing third-party libraries like pandas in the sandbox environment. ```yaml volumes: - ./python-requirements.txt:/app/python-requirements.txt ``` -------------------------------- ### Convert Markdown to Word Document Source: https://context7.com/wwwzhouhui/dify-for-dsl/llms.txt Converts Markdown text to a .docx Word document using Spire.Doc. Requires installation of the Spire.Doc library. The service runs on port 8089. ```bash # Install dependencies (requires Spire.Doc for Python) pip install spire.doc # Start the service cd dsl/office/word uvicorn md_to_docx_server:app --host 0.0.0.0 --port 8089 # Convert Markdown to Word (request body directly sends Markdown text) curl -X POST http://localhost:8089/office/word/convert \ -H "Content-Type: text/plain" \ --data-binary "# Project Report ## I. Project Overview This project is built on the Dify platform for AI workflows. ## II. Technology Stack - FastAPI - Dify DSL - Tencent Cloud COS ```python print('Hello, Dify!') ```" # Example Response # { # "download_url": "http://localhost:8089/office/word/download/1701432045.docx" # } # Download the generated Word file curl -O http://localhost:8089/office/word/download/1701432045.docx ``` -------------------------------- ### Initialize Drag-and-Drop and Load Local Storage Settings Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/py/yewu2videoaddsrt/templates/index.html Initializes the drag-and-drop functionality for video uploads and loads 'proxy' and 'api_key' from local storage into the respective input fields. ```javascript $(document).ready(function () { dropfun($("#drop"), $("#video"), $("#close")); dropfun($("#drop2"), $("#video2"), $("#close2")); // 视频解说end let proxy = localStorage.getItem('proxy') let api_key = localStorage.getItem('api_key') if (proxy) { $('#proxy').val(proxy) } if (api_key) { $('#api-key').val(api_key) } // 文件选择器 $('#load-srt').on('click', function () { $('#source-srt').val(''); // 清空文本框 var fileInput = $(''); fileInput.on('change', function (e) { var file = e.target.files[0]; var reader = new FileReader(); reader.onload = function (e) { $('#source-srt').val(e.target.result); }; reader.readAsText(file); }); fileInput.trigger('click'); }); // 下载翻译结果 SRT 文件 $('#download-srt').on('click', function () { var targetSrt = $('#target-srt').val().trim(); if (!targetSrt) { return alert('翻译结果为空,无需下载'); } var blob = new Blob([targetSrt], {type: 'text/plain'}); var url = window.URL.createObjectURL(blob); var link = document.createElement('a'); link.href = url; link.setAttribute('download', 'translation.srt'); document.body.appendChild(link); link.click(); document.body.removeChild(link); }); // 提交表单 $('#translate-form').on('submit', function (event) { event.preventDefault(); // 阻止表单默认提交行为 var formData = { 'language': $('#subtitle-language').val(), 'model_name': $('#model').val(), 'api_key': $('#api-key').val(), 'proxy': $('#proxy').val().trim(), 'text': $('#source-srt').val().trim(), 'piliang': $('#piliang').val(), 'waitsec': $('#waitsec').val(), "audio_file": window.audio_file }; if (!formData['text'] && !formData['audio_file']) { return alert('必须输入srt字幕或上传音视频文件'); } if (!formData['api_key']) { } if (formData['proxy'] && formData['proxy'].substr(0, 4) != 'http') { return alert('代理必须以http开头'); } if (formData['text'] && formData['audio_file']) { if (!confirm('同时上传了SRT字幕和音视频,将只对SRT字幕进行翻译,不转录音视频,若需转录请删掉原始SRT字幕,是否继续?')) { return; } formData['audio_file'] = ''; } if (formData['text'] && formData['language'] == '-') { return alert('存在原始SRT字幕情况下必须选择目标语言'); } formData['proxy'] && localStorage.setItem('proxy', formData['proxy']); localStorage.setItem('api_key', formData['api_key']); // 禁用提交按钮 $('#result_tips').text('') $('#submit-button').prop('disabled', true).text((formDa ``` -------------------------------- ### Download ComfyUI Bizyair Docker Image Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/dsl/difyforsiliconflow/bizyair/reademe.md Use this command to pull the latest ComfyUI Bizyair Docker image from Docker Hub. Ensure Docker is installed and configured on your system. ```bash docker pull wwwzhouhui569/comfyui_bizyair:v0.4.0 ``` -------------------------------- ### 使用 Docker Compose 部署 Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/py/fapiao/README.md 通过 Docker Compose 管理服务的启动、状态查看、日志跟踪和停止。推荐用于生产环境。 ```bash # 启动服务 docker-compose up -d # 查看服务状态 docker-compose ps # 查看日志 docker-compose logs -f fapiaosqd # 停止服务 docker-compose down ``` -------------------------------- ### Get Image from Server Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/py/readme.txt Retrieves an image from the server using its filename, subfolder, and type. It constructs a URL with query parameters and fetches the image data. Requires `server_address` to be defined globally. ```python def get_image(filename, subfolder, folder_type): data = {"filename": filename, "subfolder": subfolder, "type": folder_type} url_values = urllib.parse.urlencode(data) with urllib.request.urlopen(f"http://{server_address}/view?{url_values}") as response: return response.read() ``` -------------------------------- ### Generating OpenAPI Schema from cURL Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/dsl/difyforgitee/dify中创建并使用自定义工具-gitee绘画.md This prompt guides GPT to convert a cURL command into an OpenAPI 3.1.0 JSON schema. It specifically excludes response information, focusing on the request structure. ```text 请把curl请求命令转成openapi 3.1.0 版本的json schema,不需要包含response信息 curl --location 'http://111.119.215.74:8081/generate_image/' --header 'Content-Type: application/json' --data '{"prompt": "一只可爱的小花猫,时尚,头上戴着彩色波点蝴蝶结三角头巾,大大的腮红,很可爱,高饱和度,可爱嘟嘟,毛绒绒且柔软,身穿头巾撞色系旗袍,羊毛毡风格,脖子带你呼应色围巾,非常可爱,怀里抱一束花,上半身肖像,送给你的姿势,卡哇伊,画面简约,高饱和度,轻松气氛,丝滑的画质,中景视角,标准镜头,简约风格,32k高清图,萌态十足,蓝天白云背景,精妙无双"}' json schema请参照下面的例子 { "openapi": "3.1.0", "info": { "title": "Get weather data", "description": "Retrieves current weather data for a location.", "version": "v1.0.0" }, "servers": [ { "url": "" } ], "paths": {}, "components": { "schemas": {} } ``` -------------------------------- ### API Request for Text-to-Speech Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/py/geekaiapp/tts1/README.md Example cURL command to make a POST request to the TTS API endpoint. It includes input text, voice selection, model, speed, and desired audio format. ```bash curl --location 'http://localhost:16003/api/edge/tts12/' \ --header 'Authorization: Bearer geekaiapp' \ --header 'Content-Type: application/json' \ --data '{ "input":"你好,这是一个测试文本。", "voice": "zh-CN-XiaoxiaoNeural", "model": "tts-1", "speed": 1.0, "response_format": "mp3" }' ``` -------------------------------- ### Configure Tencent Cloud OSS Credentials Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/py/readme.txt Sets up region, secret ID, secret key, and bucket name for Tencent Cloud Object Storage using environment variables. ```python tencent_region = os.getenv('TENCENT_REGION', 'ap-nanjing') tencent_secret_id = os.getenv('TENCENT_SECRET_ID', 'xxxxxx') tencent_secret_key = os.getenv('TENCENT_SECRET_KEY', 'xxxxxx') tencent_bucket = os.getenv('TENCENT_BUCKET', 'dify-1305874767') ``` -------------------------------- ### Global Audio Playback Control - JavaScript Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/py/yewu2edgetts/index.html Manages the current audio playback state, including the audio object and the play button element. Provides a function to get the HTML for a play/pause button. ```javascript let currentAudio = null; // 当前播放的音频对象 let currentPlayBtn = null; // 当前播放按钮 // 修改音频列表中的播放按钮 HTML function getPlayButtonHTML(isPlaying) { return isPlaying ? ` ` : ` `; } ``` -------------------------------- ### 查看容器日志 Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/py/fapiao/README.md 实时查看指定 Docker 容器的日志输出。 ```bash # 查看容器日志 docker logs fapiaosqd-web ``` -------------------------------- ### Dify HTTP Request Configuration Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/dsl/story/readme.md Example of configuring an HTTP request in Dify to call the video generation service. Ensure the API key used in Dify matches the 'valid_tokens' in the server's configuration. ```json { "model": "dify-story-video", "inputs": { "prompt": "A futuristic cityscape at sunset.", "video_length": 5 }, "response_format": { "type": "json_object" } } ``` -------------------------------- ### Configure Alibaba Cloud LLM Service Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/py/readme.txt Sets up API key, base URL, and model for Alibaba Cloud's large model service using environment variables. ```python aliyuncs_api_key = os.getenv('ALIYUNCS_API_KEY', 'xxxxx') aliyuncs_base_url = os.getenv('ALIYUNCS_BASE_URL', 'https://dashscope.aliyuncs.com/compatible-mode/v1') aliyuncs_model = os.getenv('ALIYUNCS_MODEL', 'qwen-max') ``` -------------------------------- ### Dify Workflow for Mathematical Formula Recognition Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/README.md This workflow takes PDF or image input, recognizes mathematical formulas within, and outputs them in a LaTeX format that can be edited in Word. Requires installation of Pandoc and LaTeX environments. ```yml 数学公式识别工作流,输入pdf或图片,识别出里面的数学公式,并且输出支持latex格式的可编辑word,需要安装pandoc( https://github.com/jgm/pandoc/releases/tag/3.7.0.2 )和laTex( https://miktex.org/download ) 环境。 https://github.com/SK47/dify-for-dsl/tree/main/dsl/69-dify案例分享-数学公式识别工作流.yml ``` -------------------------------- ### Comfui Bizyair Workflow JSON Example Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/dsl/difyforsiliconflow/bizyair/reademe.md This JSON represents a Comfui Bizyair workflow, detailing nodes, inputs, and class types for AI image generation tasks. Pay close attention to prompt text and node consistency when customizing. ```json { "70": { "inputs": { "unet_name": "kolors/Kolors.safetensors" }, "class_type": "BizyAir_MZ_KolorsUNETLoaderV2", "_meta": { "title": "☁️BizyAir MinusZone - KolorsUNETLoaderV2" } }, "73": { "inputs": { "seed": 20, "steps": 20, "cfg": 4.5, "sampler_name": "dpmpp_sde_gpu", "scheduler": "karras", "denoise": 1, "model": [ "70", 0 ], "positive": [ "80", 0 ], "negative": [ "81", 0 ], "latent_image": [ "85", 0 ] }, "class_type": "BizyAir_KSampler", "_meta": { "title": "☁️BizyAir KSampler" } }, "75": { "inputs": { "vae_name": "sdxl/sdxl_vae.safetensors" }, "class_type": "BizyAir_VAELoader", "_meta": { "title": "☁️BizyAir Load VAE" } }, "76": { "inputs": { "samples": [ "73", 0 ], "vae": [ "75", 0 ] }, "class_type": "BizyAir_VAEDecode", "_meta": { "title": "☁️BizyAir VAE Decode" } }, "80": { "inputs": { "text": "真实的照片,20岁女生,红色外套,城市夜景" }, "class_type": "BizyAir_MinusZoneChatGLM3TextEncode", "_meta": { "title": "☁️BizyAir MinusZone ChatGLM3 Text Encode" } }, "81": { "inputs": { "text": "nsfw,脸部阴影,低分辨率,jpeg伪影、模糊、糟糕,黑脸,霓虹灯" }, "class_type": "BizyAir_MinusZoneChatGLM3TextEncode", "_meta": { "title": "☁️BizyAir MinusZone ChatGLM3 Text Encode" } }, "85": { "inputs": { "width": 1024, "height": 1024, "batch_size": 1 }, "class_type": "EmptyLatentImage", "_meta": { "title": "空Latent图像" } }, "86": { "inputs": { "images": [ "76", 0 ] }, "class_type": "PreviewImage", "_meta": { "title": "预览图像" } } } ``` -------------------------------- ### 运行 Gradio 应用 Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/py/geekaiapp/wenshengtu1/README.md 启动即梦文生图 Gradio 可视化界面。应用将在本地的 http://localhost:7860 启动。 ```bash python jm1_gradio.py ``` -------------------------------- ### Dify Workflow for Multiple Image Generation with Ji Meng 4.0 Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/README.md This workflow provides a comprehensive guide to building and using Dify workflows for generating multiple images with Ji Meng 4.0, including case studies and effect demonstrations. ```yml 免费玩转即梦 4.0 多图生成!Dify 工作流从搭建到使用全攻略,附案例效果.yml ``` -------------------------------- ### Initialize PostgreSQL Database for Student Scores Source: https://context7.com/wwwzhouhui/dify-for-dsl/llms.txt Run this SQL script to initialize the PostgreSQL database schema for student scores. Ensure your PostgreSQL server is running and accessible. ```bash psql -U postgres -f dsl/db/student/student_score.sql # or use the table creation statement in the test2sql directory psql -U postgres -f dsl/db/test2sql/student_scores.sql ``` -------------------------------- ### Dify Workflow for Google's AI Image Generation Tool Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/README.md This workflow guides users on how to call Google's latest AI image generation tool using Dify. Refer to SK47/nano_banana for related third-party plugin source code. ```yml 手把手教你用Dify调用Google最新AI画图神器.yml ``` -------------------------------- ### Configure API Key Source: https://github.com/wwwzhouhui/dify-for-dsl/blob/main/mcp/FastMCP/readme.md Modify the 'doubao_mcp_ai_server2.py' file on line 14 to replace the placeholder with your actual Volcengine API key. This key is essential for accessing cloud AI models. ```python API_KEY = "火山引擎API密钥" ```