diff --git a/pdf_clean/docker-compose-api.yml b/pdf_clean/docker-compose-api.yml index 8b0a7bc..2362723 100644 --- a/pdf_clean/docker-compose-api.yml +++ b/pdf_clean/docker-compose-api.yml @@ -20,3 +20,29 @@ services: - NVIDIA_VISIBLE_DEVICES=all stdin_open: true tty: true + +# 选项 1:使用 `curl`(PowerShell 中的 `curl` 实际上是 `Invoke-WebRequest` 的别名) + +# 你可以直接使用 `curl`,但需要调整一些语法来符合 PowerShell 的要求。以下是调整后的请求: + +# ```shell +# curl -X POST "http://localhost:8888/pdf_parse" ` +# -H "accept: application/json" ` +# -F "pdf_file=@alakhdar-et-al-2024-diffusion-models-in-de-novo-drug-design.pdf" ` +# -F "parse_method=auto" ` +# -F "is_json_md_dump=true" ` +# -F "output_dir=output" +# ``` + +# 选项 2:使用 `Invoke-RestMethod` + +# `Invoke-RestMethod` 也是 PowerShell 中的一个方便工具,可以用来发送 POST 请求。它可以直接处理表单数据: + +# ```powershell +# Invoke-RestMethod -Method Post -Uri "http://localhost:8888/pdf_parse" ` +# -Headers @{"accept" = "application/json"} ` +# -Form @{ "pdf_file" = Get-Item "alakhdar-et-al-2024-diffusion-models-in-de-novo-drug-design.pdf"; ` +# "parse_method" = "auto"; ` +# "is_json_md_dump" = "true"; ` +# "output_dir" = "output" } +# ``` \ No newline at end of file