-
Notifications
You must be signed in to change notification settings - Fork 845
fix(agents): 修复 HIL 工具审批 interrupt 被误当 ask_user_question 处理 #784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
xiangfei258
wants to merge
6
commits into
xerrors:main
from
xiangfei258:fix/hil-interrupt-payload-routing
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4da1ee6
chore: 本地定制改动(logo/首页/登录页/配置等)
xiangfei258 f3d07af
Merge remote-tracking branch 'origin/main' into my-custom
xiangfei258 27df008
chore: 合并上游 origin/main 同步至 c13a6b2c
5c9fe87
chore: 合并上游 origin/main 同步至 fd9558cf
5da5c58
fix(agents): 修复 HIL 工具审批 interrupt 在后端三处被误处理
d98cb75
feat(web): 新增 HIL 工具审批弹窗,支持 approve/reject/edit
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # Use DaoCloud mirrored vllm image for China region for gpu with Volta、Turing、Ampere、Ada Lovelace、Hopper、Blackwell architecture (7.0 <= Compute Capability <= 12.1) | ||
| # The default base image uses vLLM 0.21.0 with CUDA 13.0. For CUDA 12.9 environments, switch to the commented cu129 image below. | ||
| # Compute Capability version query (https://developer.nvidia.com/cuda-gpus) | ||
| # support x86_64 architecture and ARM(AArch64) architecture | ||
| FROM docker.m.daocloud.io/vllm/vllm-openai:v0.21.0 | ||
| # FROM docker.m.daocloud.io/vllm/vllm-openai:v0.21.0-cu129 | ||
|
|
||
| # Install libgl for opencv support & Noto fonts for Chinese characters | ||
| RUN apt-get update && \ | ||
| apt-get install -y \ | ||
| fonts-noto-core \ | ||
| fonts-noto-cjk \ | ||
| fontconfig \ | ||
| libgl1 && \ | ||
| fc-cache -fv && \ | ||
| apt-get clean && \ | ||
| rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Install mineru latest | ||
| RUN python3 -m pip install -U 'mineru[core]>=3.2.1' -i https://mirrors.aliyun.com/pypi/simple --break-system-packages && \ | ||
| python3 -m pip cache purge | ||
|
|
||
| # Download models and update the configuration file | ||
| RUN /bin/bash -c "mineru-models-download -s modelscope -m all" | ||
|
|
||
| # Set the entry point to activate the virtual environment and run the command line tool | ||
| ENTRYPOINT ["/bin/bash", "-c", "export MINERU_MODEL_SOURCE=local && exec \"$@\"", "--"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,122 @@ | ||
| services: | ||
| mineru-openai-server: | ||
| image: mineru:latest | ||
| container_name: mineru-openai-server | ||
| restart: always | ||
| profiles: ["openai-server"] | ||
| ports: | ||
| - 30000:30000 | ||
| environment: | ||
| MINERU_MODEL_SOURCE: local | ||
| entrypoint: mineru-openai-server | ||
| command: | ||
| --host 0.0.0.0 | ||
| --port 30000 | ||
| --gpu-memory-utilization 0.5 # If encountering VRAM shortage, reduce the KV cache size by this parameter; if VRAM issues persist, try lowering it further to `0.4` or below. | ||
| ulimits: | ||
| memlock: -1 | ||
| stack: 67108864 | ||
| ipc: host | ||
| healthcheck: | ||
| test: ["CMD-SHELL", "curl -f http://localhost:30000/health || exit 1"] | ||
| deploy: | ||
| resources: | ||
| reservations: | ||
| devices: | ||
| - driver: nvidia | ||
| device_ids: ["0"] # Modify for multiple GPUs: ["0", "1"] | ||
| capabilities: [gpu] | ||
|
|
||
| mineru-api: | ||
| image: mineru:latest | ||
| container_name: mineru-api | ||
| restart: always | ||
| profiles: ["api"] | ||
| ports: | ||
| - 8000:8000 | ||
| environment: | ||
| MINERU_MODEL_SOURCE: local | ||
| entrypoint: mineru-api | ||
| command: | ||
| --host 0.0.0.0 | ||
| --port 8000 | ||
| # --allow-public-http-client # Disabled by default; when binding to 0.0.0.0 or ::, this re-enables *-http-client backends and server_url. Enable only if you accept the SSRF risk. | ||
| # parameters for vllm-engine | ||
| # --gpu-memory-utilization 0.5 # If encountering VRAM shortage, reduce the KV cache size by this parameter; if VRAM issues persist, try lowering it further to `0.4` or below. | ||
| ulimits: | ||
| memlock: -1 | ||
| stack: 67108864 | ||
| ipc: host | ||
| healthcheck: | ||
| test: ["CMD-SHELL", "curl -f http://localhost:8000/health || exit 1"] | ||
| deploy: | ||
| resources: | ||
| reservations: | ||
| devices: | ||
| - driver: nvidia | ||
| device_ids: ["0"] # Modify for multiple GPUs: ["0", "1"] | ||
| capabilities: [gpu] | ||
|
|
||
| mineru-router: | ||
| image: mineru:latest | ||
| container_name: mineru-router | ||
| restart: always | ||
| profiles: ["router"] | ||
| ports: | ||
| - 8002:8002 | ||
| environment: | ||
| MINERU_MODEL_SOURCE: local | ||
| entrypoint: mineru-router | ||
| command: | ||
| --host 0.0.0.0 | ||
| --port 8002 | ||
| --local-gpus auto | ||
| # --allow-public-http-client # Disabled by default; when binding to 0.0.0.0 or ::, this re-enables *-http-client backends and server_url. Enable only if you accept the SSRF risk. | ||
| # To aggregate existing mineru-api services instead of starting local workers: | ||
| # --local-gpus none | ||
| # --upstream-url http://mineru-api:8000 | ||
| # --upstream-url http://mineru-api-2:8000 | ||
| # parameters for vllm-engine | ||
| # --gpu-memory-utilization 0.5 # If encountering VRAM shortage, reduce the KV cache size by this parameter; if VRAM issues persist, try lowering it further to `0.4` or below. | ||
| ulimits: | ||
| memlock: -1 | ||
| stack: 67108864 | ||
| ipc: host | ||
| healthcheck: | ||
| test: ["CMD-SHELL", "curl -f http://localhost:8002/health || exit 1"] | ||
| deploy: | ||
| resources: | ||
| reservations: | ||
| devices: | ||
| - driver: nvidia | ||
| device_ids: ["0"] # Modify for multiple GPUs: ["0", "1"] | ||
| capabilities: [gpu] | ||
|
|
||
| mineru-gradio: | ||
| image: mineru:latest | ||
| container_name: mineru-gradio | ||
| restart: always | ||
| profiles: ["gradio"] | ||
| ports: | ||
| - 7860:7860 | ||
| environment: | ||
| MINERU_MODEL_SOURCE: local | ||
| entrypoint: mineru-gradio | ||
| command: | ||
| --server-name 0.0.0.0 | ||
| --server-port 7860 | ||
| # --enable-api false # If you want to disable the API, set this to false | ||
| # --max-convert-pages 20 # If you want to limit the number of pages for conversion, set this to a specific number | ||
| # parameters for vllm-engine | ||
| # --gpu-memory-utilization 0.5 # If encountering VRAM shortage, reduce the KV cache size by this parameter; if VRAM issues persist, try lowering it further to `0.4` or below. | ||
| ulimits: | ||
| memlock: -1 | ||
| stack: 67108864 | ||
| ipc: host | ||
| deploy: | ||
| resources: | ||
| reservations: | ||
| devices: | ||
| - driver: nvidia | ||
| device_ids: ["0"] # Modify for multiple GPUs: ["0", "1"] | ||
| capabilities: [gpu] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,122 @@ | ||
| services: | ||
| mineru-openai-server: | ||
| image: mineru:latest | ||
| container_name: mineru-openai-server | ||
| restart: always | ||
| profiles: ["openai-server"] | ||
| ports: | ||
| - 30000:30000 | ||
| environment: | ||
| MINERU_MODEL_SOURCE: local | ||
| entrypoint: mineru-openai-server | ||
| command: | ||
| --host 0.0.0.0 | ||
| --port 30000 | ||
| # --gpu-memory-utilization 0.5 # If encountering VRAM shortage, reduce the KV cache size by this parameter; if VRAM issues persist, try lowering it further to `0.4` or below. | ||
| ulimits: | ||
| memlock: -1 | ||
| stack: 67108864 | ||
| ipc: host | ||
| healthcheck: | ||
| test: ["CMD-SHELL", "curl -f http://localhost:30000/health || exit 1"] | ||
| deploy: | ||
| resources: | ||
| reservations: | ||
| devices: | ||
| - driver: nvidia | ||
| device_ids: ["0"] # Modify for multiple GPUs: ["0", "1"] | ||
| capabilities: [gpu] | ||
|
|
||
| mineru-api: | ||
| image: mineru:latest | ||
| container_name: mineru-api | ||
| restart: always | ||
| profiles: ["api"] | ||
| ports: | ||
| - 8000:8000 | ||
| environment: | ||
| MINERU_MODEL_SOURCE: local | ||
| entrypoint: mineru-api | ||
| command: | ||
| --host 0.0.0.0 | ||
| --port 8000 | ||
| # --allow-public-http-client # Disabled by default; when binding to 0.0.0.0 or ::, this re-enables *-http-client backends and server_url. Enable only if you accept the SSRF risk. | ||
| # parameters for vllm-engine | ||
| # --gpu-memory-utilization 0.5 # If encountering VRAM shortage, reduce the KV cache size by this parameter; if VRAM issues persist, try lowering it further to `0.4` or below. | ||
| ulimits: | ||
| memlock: -1 | ||
| stack: 67108864 | ||
| ipc: host | ||
| healthcheck: | ||
| test: ["CMD-SHELL", "curl -f http://localhost:8000/health || exit 1"] | ||
| deploy: | ||
| resources: | ||
| reservations: | ||
| devices: | ||
| - driver: nvidia | ||
| device_ids: ["0"] # Modify for multiple GPUs: ["0", "1"] | ||
| capabilities: [gpu] | ||
|
|
||
| mineru-router: | ||
| image: mineru:latest | ||
| container_name: mineru-router | ||
| restart: always | ||
| profiles: ["router"] | ||
| ports: | ||
| - 8002:8002 | ||
| environment: | ||
| MINERU_MODEL_SOURCE: local | ||
| entrypoint: mineru-router | ||
| command: | ||
| --host 0.0.0.0 | ||
| --port 8002 | ||
| --local-gpus auto | ||
| # --allow-public-http-client # Disabled by default; when binding to 0.0.0.0 or ::, this re-enables *-http-client backends and server_url. Enable only if you accept the SSRF risk. | ||
| # To aggregate existing mineru-api services instead of starting local workers: | ||
| # --local-gpus none | ||
| # --upstream-url http://mineru-api:8000 | ||
| # --upstream-url http://mineru-api-2:8000 | ||
| # parameters for vllm-engine | ||
| # --gpu-memory-utilization 0.5 # If encountering VRAM shortage, reduce the KV cache size by this parameter; if VRAM issues persist, try lowering it further to `0.4` or below. | ||
| ulimits: | ||
| memlock: -1 | ||
| stack: 67108864 | ||
| ipc: host | ||
| healthcheck: | ||
| test: ["CMD-SHELL", "curl -f http://localhost:8002/health || exit 1"] | ||
| deploy: | ||
| resources: | ||
| reservations: | ||
| devices: | ||
| - driver: nvidia | ||
| device_ids: ["0"] # Modify for multiple GPUs: ["0", "1"] | ||
| capabilities: [gpu] | ||
|
|
||
| mineru-gradio: | ||
| image: mineru:latest | ||
| container_name: mineru-gradio | ||
| restart: always | ||
| profiles: ["gradio"] | ||
| ports: | ||
| - 7860:7860 | ||
| environment: | ||
| MINERU_MODEL_SOURCE: local | ||
| entrypoint: mineru-gradio | ||
| command: | ||
| --server-name 0.0.0.0 | ||
| --server-port 7860 | ||
| # --enable-api false # If you want to disable the API, set this to false | ||
| # --max-convert-pages 20 # If you want to limit the number of pages for conversion, set this to a specific number | ||
| # parameters for vllm-engine | ||
| # --gpu-memory-utilization 0.5 # If encountering VRAM shortage, reduce the KV cache size by this parameter; if VRAM issues persist, try lowering it further to `0.4` or below. | ||
| ulimits: | ||
| memlock: -1 | ||
| stack: 67108864 | ||
| ipc: host | ||
| deploy: | ||
| resources: | ||
| reservations: | ||
| devices: | ||
| - driver: nvidia | ||
| device_ids: ["0"] # Modify for multiple GPUs: ["0", "1"] | ||
| capabilities: [gpu] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果
action字典中存在"name"或"args"键但其值为None,action.get("name", "")和action.get("args", {})仍会返回None(因为get的默认值仅在键不存在时生效)。这会导致格式化后的描述中显示Tool: None或Args: None。\n\n建议使用or运算符来确保在值为None时也能正确回退到默认值: