jiayongqiang 1 tydzień temu
rodzic
commit
13d29fc339
35 zmienionych plików z 112 dodań i 82 usunięć
  1. 3 1
      agent/.gitignore
  2. 0 24
      agent/AI-TAGGING/pyproject.toml
  3. 0 0
      agent/models/bge-small-zh-v1.5/.msc
  4. 0 0
      agent/models/bge-small-zh-v1.5/.mv
  5. 0 0
      agent/models/bge-small-zh-v1.5/1_Pooling/config.json
  6. 0 0
      agent/models/bge-small-zh-v1.5/README.md
  7. 0 0
      agent/models/bge-small-zh-v1.5/config.json
  8. 0 0
      agent/models/bge-small-zh-v1.5/config_sentence_transformers.json
  9. 0 0
      agent/models/bge-small-zh-v1.5/configuration.json
  10. 0 0
      agent/models/bge-small-zh-v1.5/model.safetensors
  11. 0 0
      agent/models/bge-small-zh-v1.5/modules.json
  12. 0 0
      agent/models/bge-small-zh-v1.5/pytorch_model.bin
  13. 0 0
      agent/models/bge-small-zh-v1.5/sentence_bert_config.json
  14. 0 0
      agent/models/bge-small-zh-v1.5/special_tokens_map.json
  15. 0 0
      agent/models/bge-small-zh-v1.5/tokenizer.json
  16. 0 0
      agent/models/bge-small-zh-v1.5/tokenizer_config.json
  17. 0 0
      agent/models/bge-small-zh-v1.5/vocab.txt
  18. 68 22
      agent/pdm.lock
  19. 29 0
      agent/pyproject.toml
  20. 1 0
      agent/readme.md
  21. 0 0
      agent/src/agent/__init__.py
  22. 0 0
      agent/src/agent/api_feedback.py
  23. 0 0
      agent/src/agent/api_query.py
  24. 1 1
      agent/src/agent/api_tagging.py
  25. 0 0
      agent/src/agent/core/__init__.py
  26. 1 1
      agent/src/agent/core/sign_check.py
  27. 4 5
      agent/src/agent/core/sm3_sign.py
  28. 4 4
      agent/src/agent/main.py
  29. 0 0
      agent/src/agent/service_vector.py
  30. 0 0
      agent/tests/__init__.py
  31. 1 1
      agent/tests/api_tagging_test.py
  32. 0 0
      agent/tests/data/输入-1.docx
  33. 0 0
      agent/tests/data/输入-2.docx
  34. 0 0
      agent/tests/data/输入-3.docx
  35. 0 23
      src/api_tagging.py

+ 3 - 1
agent/AI-TAGGING/.gitignore → agent/.gitignore

@@ -5,4 +5,6 @@ __pycache__/
 .ruff_cache/
 .pdm-python
 .venv/
-__pycache__
+__pycache__
+.models/
+.venv/

+ 0 - 24
agent/AI-TAGGING/pyproject.toml

@@ -1,24 +0,0 @@
-[project]
-name = "AI-TAGGING"
-version = "0.1.0"
-description = "智能打标系统"
-authors = [
-    {name = "jiayongqiang", email = "15936285643@163.com"},
-]
-dependencies = [
-    "fastapi>=0.128.0", 
-    "uvicorn>=0.40.0", 
-    "sentence-transformers>=5.2.2", 
-    "python-multipart>=0.0.22", 
-    "requests>=2.32.5", 
-    "gmssl>=3.2.2"]
-requires-python = "==3.10.*"
-readme = "README.md"
-license = {text = "MIT"}
-
-
-[tool.pdm]
-distribution = false
-
-[tool.pdm.scripts]
-start = "uvicorn src.main:app --port 8080"

+ 0 - 0
agent/AI-TAGGING/models/bge-small-zh-v1.5/.msc → agent/models/bge-small-zh-v1.5/.msc


+ 0 - 0
agent/AI-TAGGING/models/bge-small-zh-v1.5/.mv → agent/models/bge-small-zh-v1.5/.mv


+ 0 - 0
agent/AI-TAGGING/models/bge-small-zh-v1.5/1_Pooling/config.json → agent/models/bge-small-zh-v1.5/1_Pooling/config.json


+ 0 - 0
agent/AI-TAGGING/models/bge-small-zh-v1.5/README.md → agent/models/bge-small-zh-v1.5/README.md


+ 0 - 0
agent/AI-TAGGING/models/bge-small-zh-v1.5/config.json → agent/models/bge-small-zh-v1.5/config.json


+ 0 - 0
agent/AI-TAGGING/models/bge-small-zh-v1.5/config_sentence_transformers.json → agent/models/bge-small-zh-v1.5/config_sentence_transformers.json


+ 0 - 0
agent/AI-TAGGING/models/bge-small-zh-v1.5/configuration.json → agent/models/bge-small-zh-v1.5/configuration.json


+ 0 - 0
agent/AI-TAGGING/models/bge-small-zh-v1.5/model.safetensors → agent/models/bge-small-zh-v1.5/model.safetensors


+ 0 - 0
agent/AI-TAGGING/models/bge-small-zh-v1.5/modules.json → agent/models/bge-small-zh-v1.5/modules.json


+ 0 - 0
agent/AI-TAGGING/models/bge-small-zh-v1.5/pytorch_model.bin → agent/models/bge-small-zh-v1.5/pytorch_model.bin


+ 0 - 0
agent/AI-TAGGING/models/bge-small-zh-v1.5/sentence_bert_config.json → agent/models/bge-small-zh-v1.5/sentence_bert_config.json


+ 0 - 0
agent/AI-TAGGING/models/bge-small-zh-v1.5/special_tokens_map.json → agent/models/bge-small-zh-v1.5/special_tokens_map.json


+ 0 - 0
agent/AI-TAGGING/models/bge-small-zh-v1.5/tokenizer.json → agent/models/bge-small-zh-v1.5/tokenizer.json


+ 0 - 0
agent/AI-TAGGING/models/bge-small-zh-v1.5/tokenizer_config.json → agent/models/bge-small-zh-v1.5/tokenizer_config.json


+ 0 - 0
agent/AI-TAGGING/models/bge-small-zh-v1.5/vocab.txt → agent/models/bge-small-zh-v1.5/vocab.txt


+ 68 - 22
agent/AI-TAGGING/pdm.lock → agent/pdm.lock

@@ -5,7 +5,7 @@
 groups = ["default"]
 strategy = ["inherit_metadata"]
 lock_version = "4.5.0"
-content_hash = "sha256:68f7375e9528909e571f16fae68e77ce43a7fd747c8678c2efe1adfc7217b62b"
+content_hash = "sha256:ccaaa06a03a5cdcb94e26ec41fd33983036d36925b0e6fe5f33d77a4c6ad1a37"
 
 [[metadata.targets]]
 requires_python = "==3.10.*"
@@ -16,6 +16,7 @@ version = "0.0.4"
 requires_python = ">=3.8"
 summary = "Document parameters, class attributes, return types, and variables inline, with Annotated."
 groups = ["default"]
+marker = "python_version == \"3.10\""
 files = [
     {file = "annotated_doc-0.0.4-py3-none-any.whl", hash = "sha256:571ac1dc6991c450b25a9c2d84a3705e2ae7a53467b5d111c24fa8baabbed320"},
     {file = "annotated_doc-0.0.4.tar.gz", hash = "sha256:fbcda96e87e9c92ad167c2e53839e57503ecfda18804ea28102353485033faa4"},
@@ -27,6 +28,7 @@ version = "0.7.0"
 requires_python = ">=3.8"
 summary = "Reusable constraint types to use with typing.Annotated"
 groups = ["default"]
+marker = "python_version == \"3.10\""
 dependencies = [
     "typing-extensions>=4.0.0; python_version < \"3.9\"",
 ]
@@ -41,6 +43,7 @@ version = "4.12.1"
 requires_python = ">=3.9"
 summary = "High-level concurrency and networking framework on top of asyncio or Trio"
 groups = ["default"]
+marker = "python_version == \"3.10\""
 dependencies = [
     "exceptiongroup>=1.0.2; python_version < \"3.11\"",
     "idna>=2.8",
@@ -57,6 +60,7 @@ version = "2026.1.4"
 requires_python = ">=3.7"
 summary = "Python package for providing Mozilla's CA Bundle."
 groups = ["default"]
+marker = "python_version == \"3.10\""
 files = [
     {file = "certifi-2026.1.4-py3-none-any.whl", hash = "sha256:9943707519e4add1115f44c2bc244f782c0249876bf51b6599fee1ffbedd685c"},
     {file = "certifi-2026.1.4.tar.gz", hash = "sha256:ac726dd470482006e014ad384921ed6438c457018f4b3d204aea4281258b2120"},
@@ -68,6 +72,7 @@ version = "3.4.4"
 requires_python = ">=3.7"
 summary = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet."
 groups = ["default"]
+marker = "python_version == \"3.10\""
 files = [
     {file = "charset_normalizer-3.4.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e824f1492727fa856dd6eda4f7cee25f8518a12f3c4a56a74e8095695089cf6d"},
     {file = "charset_normalizer-3.4.4-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4bd5d4137d500351a30687c2d3971758aac9a19208fc110ccb9d7188fbe709e8"},
@@ -95,6 +100,7 @@ version = "8.3.1"
 requires_python = ">=3.10"
 summary = "Composable command line interface toolkit"
 groups = ["default"]
+marker = "python_version == \"3.10\""
 dependencies = [
     "colorama; platform_system == \"Windows\"",
 ]
@@ -109,7 +115,7 @@ version = "0.4.6"
 requires_python = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
 summary = "Cross-platform colored terminal text."
 groups = ["default"]
-marker = "platform_system == \"Windows\""
+marker = "platform_system == \"Windows\" and python_version == \"3.10\""
 files = [
     {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"},
     {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"},
@@ -120,7 +126,7 @@ name = "cuda-bindings"
 version = "12.9.4"
 summary = "Python bindings for CUDA"
 groups = ["default"]
-marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
+marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\" and python_version == \"3.10\""
 dependencies = [
     "cuda-pathfinder~=1.1",
 ]
@@ -136,7 +142,7 @@ version = "1.3.3"
 requires_python = ">=3.10"
 summary = "Pathfinder for CUDA components"
 groups = ["default"]
-marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
+marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\" and python_version == \"3.10\""
 files = [
     {file = "cuda_pathfinder-1.3.3-py3-none-any.whl", hash = "sha256:9984b664e404f7c134954a771be8775dfd6180ea1e1aef4a5a37d4be05d9bbb1"},
 ]
@@ -147,7 +153,7 @@ version = "1.3.1"
 requires_python = ">=3.7"
 summary = "Backport of PEP 654 (exception groups)"
 groups = ["default"]
-marker = "python_version < \"3.11\""
+marker = "python_version == \"3.10\""
 dependencies = [
     "typing-extensions>=4.6.0; python_version < \"3.13\"",
 ]
@@ -162,6 +168,7 @@ version = "0.128.0"
 requires_python = ">=3.9"
 summary = "FastAPI framework, high performance, easy to learn, fast to code, ready for production"
 groups = ["default"]
+marker = "python_version == \"3.10\""
 dependencies = [
     "annotated-doc>=0.0.2",
     "pydantic>=2.7.0",
@@ -179,6 +186,7 @@ version = "3.20.3"
 requires_python = ">=3.10"
 summary = "A platform independent file lock."
 groups = ["default"]
+marker = "python_version == \"3.10\""
 files = [
     {file = "filelock-3.20.3-py3-none-any.whl", hash = "sha256:4b0dda527ee31078689fc205ec4f1c1bf7d56cf88b6dc9426c4f230e46c2dce1"},
     {file = "filelock-3.20.3.tar.gz", hash = "sha256:18c57ee915c7ec61cff0ecf7f0f869936c7c30191bb0cf406f1341778d0834e1"},
@@ -190,6 +198,7 @@ version = "2026.1.0"
 requires_python = ">=3.10"
 summary = "File-system specification"
 groups = ["default"]
+marker = "python_version == \"3.10\""
 files = [
     {file = "fsspec-2026.1.0-py3-none-any.whl", hash = "sha256:cb76aa913c2285a3b49bdd5fc55b1d7c708d7208126b60f2eb8194fe1b4cbdcc"},
     {file = "fsspec-2026.1.0.tar.gz", hash = "sha256:e987cb0496a0d81bba3a9d1cee62922fb395e7d4c3b575e57f547953334fe07b"},
@@ -200,6 +209,7 @@ name = "gmssl"
 version = "3.2.2"
 summary = "Pure-Python SM2/SM3/SM4 implementation"
 groups = ["default"]
+marker = "python_version == \"3.10\""
 dependencies = [
     "pycryptodomex",
 ]
@@ -213,6 +223,7 @@ version = "0.16.0"
 requires_python = ">=3.8"
 summary = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1"
 groups = ["default"]
+marker = "python_version == \"3.10\""
 files = [
     {file = "h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86"},
     {file = "h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1"},
@@ -224,7 +235,7 @@ version = "1.2.0"
 requires_python = ">=3.8"
 summary = "Fast transfer of large files with the Hugging Face Hub."
 groups = ["default"]
-marker = "platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"arm64\" or platform_machine == \"aarch64\""
+marker = "(platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"arm64\" or platform_machine == \"aarch64\") and python_version == \"3.10\""
 files = [
     {file = "hf_xet-1.2.0-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:46740d4ac024a7ca9b22bebf77460ff43332868b661186a8e46c227fdae01848"},
     {file = "hf_xet-1.2.0-cp37-abi3-macosx_11_0_arm64.whl", hash = "sha256:27df617a076420d8845bea087f59303da8be17ed7ec0cd7ee3b9b9f579dff0e4"},
@@ -242,6 +253,7 @@ version = "1.0.9"
 requires_python = ">=3.8"
 summary = "A minimal low-level HTTP client."
 groups = ["default"]
+marker = "python_version == \"3.10\""
 dependencies = [
     "certifi",
     "h11>=0.16",
@@ -257,6 +269,7 @@ version = "0.28.1"
 requires_python = ">=3.8"
 summary = "The next generation HTTP client."
 groups = ["default"]
+marker = "python_version == \"3.10\""
 dependencies = [
     "anyio",
     "certifi",
@@ -274,6 +287,7 @@ version = "1.3.7"
 requires_python = ">=3.9.0"
 summary = "Client library to download and publish models, datasets and other repos on the huggingface.co hub"
 groups = ["default"]
+marker = "python_version == \"3.10\""
 dependencies = [
     "filelock",
     "fsspec>=2023.5.0",
@@ -297,6 +311,7 @@ version = "3.11"
 requires_python = ">=3.8"
 summary = "Internationalized Domain Names in Applications (IDNA)"
 groups = ["default"]
+marker = "python_version == \"3.10\""
 files = [
     {file = "idna-3.11-py3-none-any.whl", hash = "sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea"},
     {file = "idna-3.11.tar.gz", hash = "sha256:795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902"},
@@ -308,6 +323,7 @@ version = "3.1.6"
 requires_python = ">=3.7"
 summary = "A very fast and expressive template engine."
 groups = ["default"]
+marker = "python_version == \"3.10\""
 dependencies = [
     "MarkupSafe>=2.0",
 ]
@@ -322,6 +338,7 @@ version = "1.5.3"
 requires_python = ">=3.9"
 summary = "Lightweight pipelining with Python functions"
 groups = ["default"]
+marker = "python_version == \"3.10\""
 files = [
     {file = "joblib-1.5.3-py3-none-any.whl", hash = "sha256:5fc3c5039fc5ca8c0276333a188bbd59d6b7ab37fe6632daa76bc7f9ec18e713"},
     {file = "joblib-1.5.3.tar.gz", hash = "sha256:8561a3269e6801106863fd0d6d84bb737be9e7631e33aaed3fb9ce5953688da3"},
@@ -333,6 +350,7 @@ version = "3.0.3"
 requires_python = ">=3.9"
 summary = "Safely add untrusted strings to HTML/XML markup."
 groups = ["default"]
+marker = "python_version == \"3.10\""
 files = [
     {file = "markupsafe-3.0.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2f981d352f04553a7171b8e44369f2af4055f888dfb147d55e42d29e29e74559"},
     {file = "markupsafe-3.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e1c1493fb6e50ab01d20a22826e57520f1284df32f2d8601fdd90b6304601419"},
@@ -353,6 +371,7 @@ name = "mpmath"
 version = "1.3.0"
 summary = "Python library for arbitrary-precision floating-point arithmetic"
 groups = ["default"]
+marker = "python_version == \"3.10\""
 files = [
     {file = "mpmath-1.3.0-py3-none-any.whl", hash = "sha256:a0b2b9fe80bbcd81a6647ff13108738cfb482d481d826cc0e02f5b35e5c88d2c"},
     {file = "mpmath-1.3.0.tar.gz", hash = "sha256:7a28eb2a9774d00c7bc92411c19a89209d5da7c4c9a9e227be8330a23a25b91f"},
@@ -364,6 +383,7 @@ version = "3.4.2"
 requires_python = ">=3.10"
 summary = "Python package for creating and manipulating graphs and networks"
 groups = ["default"]
+marker = "python_version == \"3.10\""
 files = [
     {file = "networkx-3.4.2-py3-none-any.whl", hash = "sha256:df5d4365b724cf81b8c6a7312509d0c22386097011ad1abe274afd5e9d3bbc5f"},
     {file = "networkx-3.4.2.tar.gz", hash = "sha256:307c3669428c5362aab27c8a1260aa8f47c4e91d3891f48be0141738d8d053e1"},
@@ -375,6 +395,7 @@ version = "2.2.6"
 requires_python = ">=3.10"
 summary = "Fundamental package for array computing in Python"
 groups = ["default"]
+marker = "python_version == \"3.10\""
 files = [
     {file = "numpy-2.2.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b412caa66f72040e6d268491a59f2c43bf03eb6c96dd8f0307829feb7fa2b6fb"},
     {file = "numpy-2.2.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8e41fd67c52b86603a91c1a505ebaef50b3314de0213461c7a6e99c9a3beff90"},
@@ -399,7 +420,7 @@ version = "12.8.4.1"
 requires_python = ">=3"
 summary = "CUBLAS native runtime libraries"
 groups = ["default"]
-marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
+marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\" and python_version == \"3.10\""
 files = [
     {file = "nvidia_cublas_cu12-12.8.4.1-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:b86f6dd8935884615a0683b663891d43781b819ac4f2ba2b0c9604676af346d0"},
     {file = "nvidia_cublas_cu12-12.8.4.1-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:8ac4e771d5a348c551b2a426eda6193c19aa630236b418086020df5ba9667142"},
@@ -412,7 +433,7 @@ version = "12.8.90"
 requires_python = ">=3"
 summary = "CUDA profiling tools runtime libs."
 groups = ["default"]
-marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
+marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\" and python_version == \"3.10\""
 files = [
     {file = "nvidia_cuda_cupti_cu12-12.8.90-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:4412396548808ddfed3f17a467b104ba7751e6b58678a4b840675c56d21cf7ed"},
     {file = "nvidia_cuda_cupti_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ea0cb07ebda26bb9b29ba82cda34849e73c166c18162d3913575b0c9db9a6182"},
@@ -425,7 +446,7 @@ version = "12.8.93"
 requires_python = ">=3"
 summary = "NVRTC native runtime libraries"
 groups = ["default"]
-marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
+marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\" and python_version == \"3.10\""
 files = [
     {file = "nvidia_cuda_nvrtc_cu12-12.8.93-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl", hash = "sha256:a7756528852ef889772a84c6cd89d41dfa74667e24cca16bb31f8f061e3e9994"},
     {file = "nvidia_cuda_nvrtc_cu12-12.8.93-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:fc1fec1e1637854b4c0a65fb9a8346b51dd9ee69e61ebaccc82058441f15bce8"},
@@ -438,7 +459,7 @@ version = "12.8.90"
 requires_python = ">=3"
 summary = "CUDA Runtime native Libraries"
 groups = ["default"]
-marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
+marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\" and python_version == \"3.10\""
 files = [
     {file = "nvidia_cuda_runtime_cu12-12.8.90-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:52bf7bbee900262ffefe5e9d5a2a69a30d97e2bc5bb6cc866688caa976966e3d"},
     {file = "nvidia_cuda_runtime_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:adade8dcbd0edf427b7204d480d6066d33902cab2a4707dcfc48a2d0fd44ab90"},
@@ -451,7 +472,7 @@ version = "9.10.2.21"
 requires_python = ">=3"
 summary = "cuDNN runtime libraries"
 groups = ["default"]
-marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
+marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\" and python_version == \"3.10\""
 dependencies = [
     "nvidia-cublas-cu12",
 ]
@@ -467,7 +488,7 @@ version = "11.3.3.83"
 requires_python = ">=3"
 summary = "CUFFT native runtime libraries"
 groups = ["default"]
-marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
+marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\" and python_version == \"3.10\""
 dependencies = [
     "nvidia-nvjitlink-cu12",
 ]
@@ -483,7 +504,7 @@ version = "1.13.1.3"
 requires_python = ">=3"
 summary = "cuFile GPUDirect libraries"
 groups = ["default"]
-marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
+marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\" and python_version == \"3.10\""
 files = [
     {file = "nvidia_cufile_cu12-1.13.1.3-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1d069003be650e131b21c932ec3d8969c1715379251f8d23a1860554b1cb24fc"},
     {file = "nvidia_cufile_cu12-1.13.1.3-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:4beb6d4cce47c1a0f1013d72e02b0994730359e17801d395bdcbf20cfb3bb00a"},
@@ -495,7 +516,7 @@ version = "10.3.9.90"
 requires_python = ">=3"
 summary = "CURAND native runtime libraries"
 groups = ["default"]
-marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
+marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\" and python_version == \"3.10\""
 files = [
     {file = "nvidia_curand_cu12-10.3.9.90-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:dfab99248034673b779bc6decafdc3404a8a6f502462201f2f31f11354204acd"},
     {file = "nvidia_curand_cu12-10.3.9.90-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:b32331d4f4df5d6eefa0554c565b626c7216f87a06a4f56fab27c3b68a830ec9"},
@@ -508,7 +529,7 @@ version = "11.7.3.90"
 requires_python = ">=3"
 summary = "CUDA solver native runtime libraries"
 groups = ["default"]
-marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
+marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\" and python_version == \"3.10\""
 dependencies = [
     "nvidia-cublas-cu12",
     "nvidia-cusparse-cu12",
@@ -526,7 +547,7 @@ version = "12.5.8.93"
 requires_python = ">=3"
 summary = "CUSPARSE native runtime libraries"
 groups = ["default"]
-marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
+marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\" and python_version == \"3.10\""
 dependencies = [
     "nvidia-nvjitlink-cu12",
 ]
@@ -541,7 +562,7 @@ name = "nvidia-cusparselt-cu12"
 version = "0.7.1"
 summary = "NVIDIA cuSPARSELt"
 groups = ["default"]
-marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
+marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\" and python_version == \"3.10\""
 files = [
     {file = "nvidia_cusparselt_cu12-0.7.1-py3-none-manylinux2014_aarch64.whl", hash = "sha256:8878dce784d0fac90131b6817b607e803c36e629ba34dc5b433471382196b6a5"},
     {file = "nvidia_cusparselt_cu12-0.7.1-py3-none-manylinux2014_x86_64.whl", hash = "sha256:f1bb701d6b930d5a7cea44c19ceb973311500847f81b634d802b7b539dc55623"},
@@ -554,7 +575,7 @@ version = "2.27.5"
 requires_python = ">=3"
 summary = "NVIDIA Collective Communication Library (NCCL) Runtime"
 groups = ["default"]
-marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
+marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\" and python_version == \"3.10\""
 files = [
     {file = "nvidia_nccl_cu12-2.27.5-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:31432ad4d1fb1004eb0c56203dc9bc2178a1ba69d1d9e02d64a6938ab5e40e7a"},
     {file = "nvidia_nccl_cu12-2.27.5-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ad730cf15cb5d25fe849c6e6ca9eb5b76db16a80f13f425ac68d8e2e55624457"},
@@ -566,7 +587,7 @@ version = "12.8.93"
 requires_python = ">=3"
 summary = "Nvidia JIT LTO Library"
 groups = ["default"]
-marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
+marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\" and python_version == \"3.10\""
 files = [
     {file = "nvidia_nvjitlink_cu12-12.8.93-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl", hash = "sha256:81ff63371a7ebd6e6451970684f916be2eab07321b73c9d244dc2b4da7f73b88"},
     {file = "nvidia_nvjitlink_cu12-12.8.93-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:adccd7161ace7261e01bb91e44e88da350895c270d23f744f0820c818b7229e7"},
@@ -579,7 +600,7 @@ version = "3.4.5"
 requires_python = ">=3"
 summary = "NVSHMEM creates a global address space that provides efficient and scalable communication for NVIDIA GPU clusters."
 groups = ["default"]
-marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
+marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\" and python_version == \"3.10\""
 files = [
     {file = "nvidia_nvshmem_cu12-3.4.5-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:0b48363fc6964dede448029434c6abed6c5e37f823cb43c3bcde7ecfc0457e15"},
     {file = "nvidia_nvshmem_cu12-3.4.5-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:042f2500f24c021db8a06c5eec2539027d57460e1c1a762055a6554f72c369bd"},
@@ -591,7 +612,7 @@ version = "12.8.90"
 requires_python = ">=3"
 summary = "NVIDIA Tools Extension"
 groups = ["default"]
-marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
+marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\" and python_version == \"3.10\""
 files = [
     {file = "nvidia_nvtx_cu12-12.8.90-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d7ad891da111ebafbf7e015d34879f7112832fc239ff0d7d776b6cb685274615"},
     {file = "nvidia_nvtx_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:5b17e2001cc0d751a5bc2c6ec6d26ad95913324a4adb86788c944f8ce9ba441f"},
@@ -604,6 +625,7 @@ version = "26.0"
 requires_python = ">=3.8"
 summary = "Core utilities for Python packages"
 groups = ["default"]
+marker = "python_version == \"3.10\""
 files = [
     {file = "packaging-26.0-py3-none-any.whl", hash = "sha256:b36f1fef9334a5588b4166f8bcd26a14e521f2b55e6b9de3aaa80d3ff7a37529"},
     {file = "packaging-26.0.tar.gz", hash = "sha256:00243ae351a257117b6a241061796684b084ed1c516a08c48a3f7e147a9d80b4"},
@@ -615,6 +637,7 @@ version = "3.23.0"
 requires_python = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
 summary = "Cryptographic library for Python"
 groups = ["default"]
+marker = "python_version == \"3.10\""
 files = [
     {file = "pycryptodomex-3.23.0-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:06698f957fe1ab229a99ba2defeeae1c09af185baa909a31a5d1f9d42b1aaed6"},
     {file = "pycryptodomex-3.23.0-cp37-abi3-macosx_10_9_x86_64.whl", hash = "sha256:b2c2537863eccef2d41061e82a881dcabb04944c5c06c5aa7110b577cc487545"},
@@ -641,6 +664,7 @@ version = "2.12.5"
 requires_python = ">=3.9"
 summary = "Data validation using Python type hints"
 groups = ["default"]
+marker = "python_version == \"3.10\""
 dependencies = [
     "annotated-types>=0.6.0",
     "pydantic-core==2.41.5",
@@ -658,6 +682,7 @@ version = "2.41.5"
 requires_python = ">=3.9"
 summary = "Core functionality for Pydantic validation and serialization"
 groups = ["default"]
+marker = "python_version == \"3.10\""
 dependencies = [
     "typing-extensions>=4.14.1",
 ]
@@ -692,6 +717,7 @@ version = "0.0.22"
 requires_python = ">=3.10"
 summary = "A streaming multipart parser for Python"
 groups = ["default"]
+marker = "python_version == \"3.10\""
 files = [
     {file = "python_multipart-0.0.22-py3-none-any.whl", hash = "sha256:2b2cd894c83d21bf49d702499531c7bafd057d730c201782048f7945d82de155"},
     {file = "python_multipart-0.0.22.tar.gz", hash = "sha256:7340bef99a7e0032613f56dc36027b959fd3b30a787ed62d310e951f7c3a3a58"},
@@ -703,6 +729,7 @@ version = "6.0.3"
 requires_python = ">=3.8"
 summary = "YAML parser and emitter for Python"
 groups = ["default"]
+marker = "python_version == \"3.10\""
 files = [
     {file = "pyyaml-6.0.3-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:214ed4befebe12df36bcc8bc2b64b396ca31be9304b8f59e25c11cf94a4c033b"},
     {file = "pyyaml-6.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:02ea2dfa234451bbb8772601d7b8e426c2bfa197136796224e50e35a78777956"},
@@ -722,6 +749,7 @@ version = "2026.1.15"
 requires_python = ">=3.9"
 summary = "Alternative regular expression module, to replace re."
 groups = ["default"]
+marker = "python_version == \"3.10\""
 files = [
     {file = "regex-2026.1.15-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4e3dd93c8f9abe8aa4b6c652016da9a3afa190df5ad822907efe6b206c09896e"},
     {file = "regex-2026.1.15-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:97499ff7862e868b1977107873dd1a06e151467129159a6ffd07b66706ba3a9f"},
@@ -749,6 +777,7 @@ version = "2.32.5"
 requires_python = ">=3.9"
 summary = "Python HTTP for Humans."
 groups = ["default"]
+marker = "python_version == \"3.10\""
 dependencies = [
     "certifi>=2017.4.17",
     "charset-normalizer<4,>=2",
@@ -766,6 +795,7 @@ version = "0.7.0"
 requires_python = ">=3.9"
 summary = ""
 groups = ["default"]
+marker = "python_version == \"3.10\""
 files = [
     {file = "safetensors-0.7.0-cp38-abi3-macosx_10_12_x86_64.whl", hash = "sha256:c82f4d474cf725255d9e6acf17252991c3c8aac038d6ef363a4bf8be2f6db517"},
     {file = "safetensors-0.7.0-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:94fd4858284736bb67a897a41608b5b0c2496c9bdb3bf2af1fa3409127f20d57"},
@@ -794,6 +824,7 @@ version = "1.7.2"
 requires_python = ">=3.10"
 summary = "A set of python modules for machine learning and data mining"
 groups = ["default"]
+marker = "python_version == \"3.10\""
 dependencies = [
     "joblib>=1.2.0",
     "numpy>=1.22.0",
@@ -815,6 +846,7 @@ version = "1.15.3"
 requires_python = ">=3.10"
 summary = "Fundamental algorithms for scientific computing in Python"
 groups = ["default"]
+marker = "python_version == \"3.10\""
 dependencies = [
     "numpy<2.5,>=1.23.5",
 ]
@@ -837,6 +869,7 @@ version = "5.2.2"
 requires_python = ">=3.10"
 summary = "Embeddings, Retrieval, and Reranking"
 groups = ["default"]
+marker = "python_version == \"3.10\""
 dependencies = [
     "huggingface-hub>=0.20.0",
     "numpy",
@@ -858,6 +891,7 @@ version = "1.5.4"
 requires_python = ">=3.7"
 summary = "Tool to Detect Surrounding Shell"
 groups = ["default"]
+marker = "python_version == \"3.10\""
 files = [
     {file = "shellingham-1.5.4-py2.py3-none-any.whl", hash = "sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686"},
     {file = "shellingham-1.5.4.tar.gz", hash = "sha256:8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de"},
@@ -869,6 +903,7 @@ version = "0.50.0"
 requires_python = ">=3.10"
 summary = "The little ASGI library that shines."
 groups = ["default"]
+marker = "python_version == \"3.10\""
 dependencies = [
     "anyio<5,>=3.6.2",
     "typing-extensions>=4.10.0; python_version < \"3.13\"",
@@ -884,6 +919,7 @@ version = "1.14.0"
 requires_python = ">=3.9"
 summary = "Computer algebra system (CAS) in Python"
 groups = ["default"]
+marker = "python_version == \"3.10\""
 dependencies = [
     "mpmath<1.4,>=1.1.0",
 ]
@@ -898,6 +934,7 @@ version = "3.6.0"
 requires_python = ">=3.9"
 summary = "threadpoolctl"
 groups = ["default"]
+marker = "python_version == \"3.10\""
 files = [
     {file = "threadpoolctl-3.6.0-py3-none-any.whl", hash = "sha256:43a0b8fd5a2928500110039e43a5eed8480b918967083ea48dc3ab9f13c4a7fb"},
     {file = "threadpoolctl-3.6.0.tar.gz", hash = "sha256:8ab8b4aa3491d812b623328249fab5302a68d2d71745c8a4c719a2fcaba9f44e"},
@@ -909,6 +946,7 @@ version = "0.22.2"
 requires_python = ">=3.9"
 summary = ""
 groups = ["default"]
+marker = "python_version == \"3.10\""
 dependencies = [
     "huggingface-hub<2.0,>=0.16.4",
 ]
@@ -941,6 +979,7 @@ version = "2.10.0"
 requires_python = ">=3.10"
 summary = "Tensors and Dynamic neural networks in Python with strong GPU acceleration"
 groups = ["default"]
+marker = "python_version == \"3.10\""
 dependencies = [
     "cuda-bindings==12.9.4; platform_system == \"Linux\" and platform_machine == \"x86_64\"",
     "filelock",
@@ -980,6 +1019,7 @@ version = "4.67.2"
 requires_python = ">=3.7"
 summary = "Fast, Extensible Progress Meter"
 groups = ["default"]
+marker = "python_version == \"3.10\""
 dependencies = [
     "colorama; platform_system == \"Windows\"",
 ]
@@ -994,6 +1034,7 @@ version = "5.0.0"
 requires_python = ">=3.10.0"
 summary = "Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training."
 groups = ["default"]
+marker = "python_version == \"3.10\""
 dependencies = [
     "filelock",
     "huggingface-hub<2.0,>=1.3.0",
@@ -1017,7 +1058,7 @@ version = "3.6.0"
 requires_python = "<3.15,>=3.10"
 summary = "A language and compiler for custom Deep Learning operations"
 groups = ["default"]
-marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\""
+marker = "platform_system == \"Linux\" and platform_machine == \"x86_64\" and python_version == \"3.10\""
 dependencies = [
     "importlib-metadata; python_version < \"3.10\"",
 ]
@@ -1032,6 +1073,7 @@ version = "0.21.1"
 requires_python = ">=3.9"
 summary = "Typer, build great CLIs. Easy to code. Based on Python type hints."
 groups = ["default"]
+marker = "python_version == \"3.10\""
 dependencies = [
     "click>=8.0.0",
     "typing-extensions>=3.7.4.3",
@@ -1047,6 +1089,7 @@ version = "4.15.0"
 requires_python = ">=3.9"
 summary = "Backported and Experimental Type Hints for Python 3.9+"
 groups = ["default"]
+marker = "python_version == \"3.10\""
 files = [
     {file = "typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548"},
     {file = "typing_extensions-4.15.0.tar.gz", hash = "sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466"},
@@ -1058,6 +1101,7 @@ version = "0.4.2"
 requires_python = ">=3.9"
 summary = "Runtime typing introspection tools"
 groups = ["default"]
+marker = "python_version == \"3.10\""
 dependencies = [
     "typing-extensions>=4.12.0",
 ]
@@ -1072,6 +1116,7 @@ version = "2.6.3"
 requires_python = ">=3.9"
 summary = "HTTP library with thread-safe connection pooling, file post, and more."
 groups = ["default"]
+marker = "python_version == \"3.10\""
 files = [
     {file = "urllib3-2.6.3-py3-none-any.whl", hash = "sha256:bf272323e553dfb2e87d9bfd225ca7b0f467b919d7bbd355436d3fd37cb0acd4"},
     {file = "urllib3-2.6.3.tar.gz", hash = "sha256:1b62b6884944a57dbe321509ab94fd4d3b307075e0c2eae991ac71ee15ad38ed"},
@@ -1083,6 +1128,7 @@ version = "0.40.0"
 requires_python = ">=3.10"
 summary = "The lightning-fast ASGI server."
 groups = ["default"]
+marker = "python_version == \"3.10\""
 dependencies = [
     "click>=7.0",
     "h11>=0.8",

+ 29 - 0
agent/pyproject.toml

@@ -0,0 +1,29 @@
+[project]
+name = "agent"
+version = "0.1.0"
+description = "ai-tagging"
+authors = [
+    {name = "jiayongqiang", email = "15936285643@163.com"},
+]
+dependencies = [
+    "fastapi>=0.128.0",
+    "uvicorn>=0.40.0",
+    "sentence-transformers>=5.2.2",
+    "python-multipart>=0.0.22",
+    "requests>=2.32.5",
+    "gmssl>=3.2.2",
+]
+requires-python = ">=3.10"
+readme = "README.md"
+license = {text = "MIT"}
+
+[tool.pdm]
+build.package-dir = "src"
+distribution = true
+
+[tool.pdm.scripts]
+start = "uvicorn agent.main:app --port 8080"
+
+[build-system]
+requires = ["pdm-backend"]
+build-backend = "pdm.backend"

+ 1 - 0
agent/readme.md

@@ -0,0 +1 @@
+# AI-TAGGING

+ 0 - 0
agent/src/agent/__init__.py


+ 0 - 0
agent/AI-TAGGING/src/api_feedback.py → agent/src/agent/api_feedback.py


+ 0 - 0
agent/AI-TAGGING/src/api_query.py → agent/src/agent/api_query.py


+ 1 - 1
agent/AI-TAGGING/src/api_tagging.py → agent/src/agent/api_tagging.py

@@ -1,6 +1,6 @@
 from fastapi import APIRouter , UploadFile  ,Form
 from pydantic import BaseModel,Field
-from core.sign_check import check
+from agent.core.sign_check import check
 import logging
 router = APIRouter(prefix="/tagging", tags=["AI Tagging"])
 

+ 0 - 0
agent/src/agent/core/__init__.py


+ 1 - 1
agent/AI-TAGGING/src/core/sign_check.py → agent/src/agent/core/sign_check.py

@@ -1,4 +1,4 @@
-from sm3_sign import generate
+from agent.core.sm3_sign import generate
 import time
 import logging
 def check(app_id:str, app_secret:str,sign:str, timestamp:int, params:dict[str,any]) -> bool:

+ 4 - 5
agent/AI-TAGGING/src/core/sm3_sign.py → agent/src/agent/core/sm3_sign.py

@@ -1,4 +1,3 @@
-import hashlib
 import hmac
 from typing import Union
 
@@ -11,13 +10,13 @@ def generate(key: bytes, msg: Union[bytes,dict[str,any]]) -> str:
     return hmac.new(key, msg, digestmod='sm3').hexdigest()
 
 if __name__ == "__main__":
-    print('sm3' in hashlib.algorithms_available)  # True 表示可用
+    # print('sm3' in hashlib.algorithms_available)  # True 表示可用
     key = b"secret_key"
     msg = b"message to sign"
-    signature = sign(key, msg)
+    signature = generate(key, msg)
     print(f"SM2 HMAC Signature: {signature}")
-    signature = sign(key, {"b": "value2", "a": "value1", "c": ""})
+    signature = generate(key, {"b": "value2", "a": "value1", "c": ""})
     print(f"SM2 HMAC Signature with dict: {signature}")
-    signature = sign(key, {"b": "value2", "a": "value1", "c": "","d": ""})
+    signature = generate(key, {"b": "value2", "a": "value1", "c": "","d": ""})
     print(f"SM2 HMAC Signature with dict: {signature}")
     

+ 4 - 4
agent/AI-TAGGING/src/main.py → agent/src/agent/main.py

@@ -1,7 +1,7 @@
 from fastapi import FastAPI,APIRouter   
-from src.service_vector import compute_embedding
+from agent.service_vector import compute_embedding
 import time
-from src.api_tagging import router as tagging_router
+from agent.api_tagging import router as tagging_router
 
 app = FastAPI(
     title="AI-TAGGING",
@@ -10,10 +10,10 @@ app = FastAPI(
 )
 
 api_router = APIRouter()
-api_router.include_router(tagging_router)
-
 app.include_router(api_router, prefix="/aitag/v1")
 
+api_router.include_router(tagging_router)
+
 @app.get("/test")
 def home():
     l1 = time.time()

+ 0 - 0
agent/AI-TAGGING/src/service_vector.py → agent/src/agent/service_vector.py


+ 0 - 0
agent/tests/__init__.py


+ 1 - 1
agent/AI-TAGGING/test/api_tagging_test.py → agent/tests/api_tagging_test.py

@@ -1,5 +1,5 @@
 import requests
-from src.core.sm3_sign import generate
+from agent.core.sm3_sign import generate
 
 APP_ID = "test_app"
 APP_SECRET = "test_secret"

+ 0 - 0
agent/AI-TAGGING/test/data/输入-1.docx → agent/tests/data/输入-1.docx


+ 0 - 0
agent/AI-TAGGING/test/data/输入-2.docx → agent/tests/data/输入-2.docx


+ 0 - 0
agent/AI-TAGGING/test/data/输入-3.docx → agent/tests/data/输入-3.docx


+ 0 - 23
src/api_tagging.py

@@ -1,23 +0,0 @@
-from fastapi import APIRouter , UploadFile  ,Form
-from pydantic import BaseModel,Field
-from src.
-
-router = APIRouter(prefix="/tagging", tags=["AI Tagging"])
-
-@router.post("/")
-async def ai_tagging(app_id: str = Form(...), 
-                     timestamp: int = Form(...), 
-                     sign: str = Form(...),
-                     business_attr: str = Form(...),
-                     category: str = Form(...),
-                     phrase: str = Form(...),
-                     attachment: UploadFile = None):
-    print(f"app_id: {app_id}, timestamp: {timestamp}, sign: {sign}, business_attr: {business_attr}, category: {category}, phrase: {phrase}")
-    
-    if attachment:
-        content = await attachment.read()
-        print(f"Received attachment: {attachment.filename}, size: {len(content)} bytes")
-    return {
-        "code": 200,
-        "message": "AI Tagging successful"
-    }