{"repo":"pig-mesh/office2md","free":true,"listed":false,"github":"https://github.com/pig-mesh/office2md","clone":"git clone https://github.com/pig-mesh/office2md.git","description":"[Required for large models] Office to Markdown service implementation, based on Microsoft Markitdown.","language":"Python","stars":32,"topics":["markdown","markitdown","office"],"license":"Apache-2.0","category":"deployment-docker-iac","readme_excerpt":"office2md 这是一项基于 Markdown 格式的多功能转换服务，支持将 PowerPoint、Word、Excel、图像、音频和 HTML 等文件转化为 Markdown 格式。同时，服务整合了 Gitee AI 和智谱 AI 提供的 GLM-4V 模型，以及阿里云百炼平台的 Qwen-VL-Max 模型，用于图片和 PDF 文件的高效文本识别。 Docker 使用说明 1. 快速使用 2. 使用 Gitee AI 3. 使用阿里云百炼平台 环境变量说明 服务支持以下环境变量配置： 环境变量 说明 默认值 ------------ ---------------------- ------------------------------------------------------ API KEY AI 平台的 API 密钥 XXXX BASE URL AI 平台的 API 基础 URL https://open.bigmodel.cn/api/paas/v4 MODEL 使用的模型名称 glm-4v-flash DELETE DELAY 临时文件删除延迟（秒） 300 PROMPT 文本提取提示词 提取图片中全部的文本，不需要任何推理和总结，只需要原文 支持的模型配置 智谱 AI - MODEL=glm-4v-flash - BASE URL=https://open.bigmodel.cn/api/paas/v4 Gitee AI - MODEL=InternVL2 5-26B - BASE URL=https://ai.gitee.com/v1 阿里云百炼 - MODEL=qwen-vl-max - BASE URL=https://dashscope.aliyuncs.com/compatible-mode/v1 API 接口 1. 上传图片并提取文本 Endpoint: POST /upload/ 请求格式: multipart/form-data 参数: - file: 图片文件 响应示例: 2. 文档图像矫正 Endpoint: POST /uvdoc/unwarp 请求格式: multipart/form-data 参数: - file: 需要进行展平处理的文档图片文件 响应格式: image/png 说明: - 该接口用于处理弯曲变形的文档图片，返回展平后的图片 - 支持常见图片格式（PNG、JPEG等） - 返回的是展平后的PNG格式图片数据 错误响应: 源码运行 注意事项 1. 使用前请确保已获取相应平台的 API 密钥 2. 智谱 AI 和阿里云百炼平台的接口略有不同，请确保使用正确的配置 3. 上传的图片文件会在处理后自动删除（默认 5 分钟） 4. 服务默认监听 8000 端口","default_branch":null,"files":null,"tree":[],"storefront":"/r/pig-mesh","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/pig-mesh/office2md/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}