No description
Find a file
2025-11-10 15:43:33 +08:00
pkg Parse LLM md to html 2025-11-10 15:43:33 +08:00
.gitignore Add requirements.txt 2025-10-31 09:59:16 +08:00
config.py Add Localpath config, join request filename with path 2025-10-31 10:32:29 +08:00
config_sample.yaml Add Localpath config, join request filename with path 2025-10-31 10:32:29 +08:00
main.py Format error response body, tidy code 2025-11-06 10:33:32 +08:00
README.md Format error response body, tidy code 2025-11-06 10:33:32 +08:00
requirements.txt Parse LLM md to html 2025-11-10 15:43:33 +08:00
test-codeless.py Handle callback failure 2025-10-30 16:18:59 +08:00

BC-MSG

A FastAPI app that allows to parse a local .msg file, and summrize msg content with LLM

Return msg body html and LLM result with callback requests

Core Dependencies:

Run & Build

dev under python 3.8

Run

Recommended uv

# clone & edit config
uv venv --python 3.8
uv pip install -r requirements.txt
uv run main.py
...

Build

uv pip install pyinstaller
pyinstaller main.py
# binary should be in ./dist/main/main

Config

host: "0.0.0.0"
port: 20723

# debug, info, warn
log_level: "info"

# Local file path
# The request given file path is not coresponding to local storage path
# When request is giving a path, not name, only the name will be extracted and 
# process file in the path with name
local_path: "..." 

# Callback api url
codeless_api_url: ""

thread_max_workers: 5

llm_model:
  url: "https://.../v1"
  name: ""
  api_key: "..."

Interface details

调AI接口传参

{
        "id": "cu-CuyVqiyoX2", #原始值回传
        "Codeless-Token": "Z...n", #回传header原始值
        "filePath": "/file/ftp/xxx.jpg", #文件路径
        "emailType": "SA", #原始值回传
        "data": {
             "field1": "string1", #原始值回传
             "field2": "string2", #原始值回传
             "field3": "string3", #原始值回传
             "field4": "string4", #原始值回传
             "field5": "string5", #原始值回传
        }
 }

调低代码接口: 链接:<...>

Header:  
Codeless-Token  = Z...n 

Body(Json):

{
        "id": "cu-CuyVqiyoX2", #原始值回传
        "emailContent": "富文本", #邮件原文
        "emailAnalysis": "富文本",#邮件总结
        "emailType": "SA", #原始值回传
        "data": {
             "field1": "string1", #原始值回传
             "field2": "string2", #原始值回传
             "field3": "string3", #原始值回传
             "field4": "string4", #原始值回传
             "field5": "string5", #原始值回传
        }
 }


低代码返回参数:

{
    "success": true,
    "resultCode": "Common.Success",
    "resultMsg": "成功"
}