No description
- Python 100%
| pkg | ||
| .gitignore | ||
| config.py | ||
| config_sample.yaml | ||
| main.py | ||
| README.md | ||
| requirements.txt | ||
| test-codeless.py | ||
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": "成功"
}