model-compose 0.3.11__tar.gz → 0.3.12__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {model_compose-0.3.11/src/model_compose.egg-info → model_compose-0.3.12}/PKG-INFO +1 -1
- {model_compose-0.3.11 → model_compose-0.3.12}/pyproject.toml +1 -1
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/services/http_client.py +33 -2
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/services/http_server.py +33 -2
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/services/model/tasks/image_to_text.py +3 -2
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/services/model/tasks/summarization.py +3 -2
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/services/model/tasks/text_generation.py +3 -2
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/services/model/tasks/translation.py +3 -2
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/services/http_server.py +10 -27
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/utils/http_client.py +26 -15
- model_compose-0.3.12/src/mindor/core/utils/http_response.py +25 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/action/impl/http_client.py +3 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/action/impl/http_server.py +3 -0
- model_compose-0.3.12/src/mindor/dsl/schema/transport/http.py +8 -0
- {model_compose-0.3.11 → model_compose-0.3.12/src/model_compose.egg-info}/PKG-INFO +1 -1
- {model_compose-0.3.11 → model_compose-0.3.12}/src/model_compose.egg-info/SOURCES.txt +2 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/LICENSE +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/README.md +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/setup.cfg +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/cli/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/cli/compose.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/base.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/component.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/context.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/services/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/services/mcp_client.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/services/mcp_server.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/services/model/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/services/model/base.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/services/model/model.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/services/model/tasks/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/services/model/tasks/text_classification.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/services/model/tasks/text_embedding.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/services/shell.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/services/text_splitter.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/services/workflow.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/compose/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/compose/compose.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/compose/manager.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/base.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/controller.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/runner/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/runner/client.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/runner/http_client.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/runner/mcp_client.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/runner/runner.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/runtime/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/runtime/docker/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/runtime/docker/context/Dockerfile +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/runtime/docker/docker.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/runtime/native/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/runtime/native/native.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/runtime/specs.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/services/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/services/mcp_server.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/webui/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/webui/gradio.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/webui/webui.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/gateway/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/gateway/base.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/gateway/gateway.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/gateway/services/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/gateway/services/http_tunnel.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/gateway/services/ssh_tunnel.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/listener/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/listener/base.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/listener/listener.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/listener/services/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/listener/services/http_callback.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/logger/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/logger/base.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/logger/logger.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/logger/logging.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/logger/services/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/logger/services/console.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/logger/services/file.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/runtime/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/runtime/docker/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/runtime/docker/docker.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/runtime/env.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/services/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/services/async_service.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/utils/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/utils/caching.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/utils/http_request.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/utils/http_status.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/utils/image.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/utils/mcp_client.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/utils/renderers.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/utils/resolvers.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/utils/shell.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/utils/ssh_client.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/utils/streamer.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/utils/streaming.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/utils/time.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/utils/workqueue.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/workflow/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/workflow/context.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/workflow/job/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/workflow/job/base.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/workflow/job/impl/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/workflow/job/impl/action.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/workflow/job/impl/delay.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/workflow/job/impl/filter.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/workflow/job/impl/if_.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/workflow/job/impl/random_router.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/workflow/job/impl/switch.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/workflow/job/job.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/workflow/schema.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/workflow/workflow.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/loader.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/action/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/action/action.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/action/impl/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/action/impl/common.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/action/impl/mcp_client.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/action/impl/mcp_server.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/action/impl/model/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/action/impl/model/impl/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/action/impl/model/impl/common.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/action/impl/model/impl/image_to_text.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/action/impl/model/impl/summarization.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/action/impl/model/impl/text_classification.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/action/impl/model/impl/text_embedding.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/action/impl/model/impl/text_generation.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/action/impl/model/impl/translation.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/action/impl/model/model.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/action/impl/shell.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/action/impl/text_splitter.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/action/impl/workflow.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/component/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/component/component.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/component/impl/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/component/impl/common.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/component/impl/http_client.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/component/impl/http_server.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/component/impl/mcp_client.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/component/impl/mcp_server.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/component/impl/model/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/component/impl/model/impl/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/component/impl/model/impl/common.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/component/impl/model/impl/image_to_text.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/component/impl/model/impl/summarization.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/component/impl/model/impl/text_classification.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/component/impl/model/impl/text_embedding.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/component/impl/model/impl/text_generation.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/component/impl/model/impl/translation.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/component/impl/model/impl/types.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/component/impl/model/model.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/component/impl/shell.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/component/impl/text_splitter.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/component/impl/types.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/component/impl/workflow.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/compose.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/controller/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/controller/controller.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/controller/impl/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/controller/impl/common.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/controller/impl/http_server.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/controller/impl/mcp_server.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/controller/impl/types.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/controller/webui/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/controller/webui/impl/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/controller/webui/impl/common.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/controller/webui/impl/dynamic.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/controller/webui/impl/gradio.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/controller/webui/impl/static.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/controller/webui/webui.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/gateway/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/gateway/gateway.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/gateway/impl/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/gateway/impl/common.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/gateway/impl/http_tunnel/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/gateway/impl/http_tunnel/http_tunnel.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/gateway/impl/http_tunnel/impl/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/gateway/impl/http_tunnel/impl/cloudflare.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/gateway/impl/http_tunnel/impl/common.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/gateway/impl/http_tunnel/impl/ngrok.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/gateway/impl/ssh_tunnel.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/gateway/impl/types.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/job/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/job/impl/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/job/impl/action.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/job/impl/common.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/job/impl/delay.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/job/impl/filter.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/job/impl/if_.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/job/impl/random_router.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/job/impl/switch.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/job/impl/types.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/job/job.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/listener/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/listener/impl/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/listener/impl/common.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/listener/impl/http_callback.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/listener/impl/types.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/listener/listener.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/logger/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/logger/impl/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/logger/impl/common.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/logger/impl/console.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/logger/impl/file.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/logger/impl/types.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/logger/logger.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/runtime/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/runtime/impl/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/runtime/impl/common.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/runtime/impl/docker.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/runtime/impl/native.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/runtime/impl/types.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/runtime/runtime.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/transport/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/transport/ssh.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/workflow.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/utils/__init__.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/utils/annotation.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/utils/enum.py +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/model_compose.egg-info/dependency_links.txt +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/model_compose.egg-info/entry_points.txt +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/model_compose.egg-info/requires.txt +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/src/model_compose.egg-info/top_level.txt +0 -0
- {model_compose-0.3.11 → model_compose-0.3.12}/tests/test_cli.py +0 -0
{model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/services/http_client.py
RENAMED
|
@@ -2,14 +2,15 @@ from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annot
|
|
|
2
2
|
from abc import ABC, abstractmethod
|
|
3
3
|
from mindor.dsl.schema.component import HttpClientComponentConfig
|
|
4
4
|
from mindor.dsl.schema.action import ActionConfig, HttpClientActionConfig, HttpClientCompletionType, HttpClientCompletionConfig
|
|
5
|
+
from mindor.dsl.schema.transport.http import HttpStreamFormat
|
|
5
6
|
from mindor.core.listener import HttpCallbackListener
|
|
6
|
-
from mindor.core.utils.http_client import HttpClient
|
|
7
|
+
from mindor.core.utils.http_client import HttpClient, HttpEventStreamResource
|
|
7
8
|
from mindor.core.utils.http_status import is_status_code_matched
|
|
8
9
|
from mindor.core.utils.time import parse_duration
|
|
9
10
|
from ..base import ComponentService, ComponentType, ComponentGlobalConfigs, register_component
|
|
10
11
|
from ..context import ComponentActionContext
|
|
11
12
|
from datetime import datetime, timezone
|
|
12
|
-
import asyncio
|
|
13
|
+
import asyncio, json
|
|
13
14
|
|
|
14
15
|
class HttpClientCompletion(ABC):
|
|
15
16
|
def __init__(self, config: HttpClientCompletionConfig):
|
|
@@ -94,10 +95,28 @@ class HttpClientAction:
|
|
|
94
95
|
headers = await context.render_variable(self.config.headers)
|
|
95
96
|
|
|
96
97
|
response, result = await client.request(url_or_path, method, params, body, headers), None
|
|
98
|
+
|
|
99
|
+
if isinstance(response, HttpEventStreamResource) and context.contains_variable_reference("response[]", self.config.output):
|
|
100
|
+
async def _stream_generator(stream: HttpEventStreamResource):
|
|
101
|
+
async for chunk in stream:
|
|
102
|
+
context.register_source("response[]", self._convert_stream_chunk(chunk))
|
|
103
|
+
yield await context.render_variable(self.config.output, ignore_files=True)
|
|
104
|
+
|
|
105
|
+
return _stream_generator(response)
|
|
106
|
+
|
|
97
107
|
context.register_source("response", response)
|
|
98
108
|
|
|
99
109
|
if self.completion:
|
|
100
110
|
result = await self.completion.run(context, client)
|
|
111
|
+
|
|
112
|
+
if isinstance(result, HttpEventStreamResource) and context.contains_variable_reference("result[]", self.config.output):
|
|
113
|
+
async def _stream_generator(stream: HttpEventStreamResource):
|
|
114
|
+
async for chunk in stream:
|
|
115
|
+
context.register_source("result[]", self._convert_stream_chunk(chunk))
|
|
116
|
+
yield await context.render_variable(self.config.output, ignore_files=True)
|
|
117
|
+
|
|
118
|
+
return _stream_generator(result)
|
|
119
|
+
|
|
101
120
|
context.register_source("result", result)
|
|
102
121
|
|
|
103
122
|
return (await context.render_variable(self.config.output, ignore_files=True)) if self.config.output else (result or response)
|
|
@@ -108,6 +127,18 @@ class HttpClientAction:
|
|
|
108
127
|
|
|
109
128
|
return await context.render_variable(self.config.endpoint)
|
|
110
129
|
|
|
130
|
+
def _convert_stream_chunk(self, chunk: bytes) -> Any:
|
|
131
|
+
if self.config.stream_format == HttpStreamFormat.JSON:
|
|
132
|
+
try:
|
|
133
|
+
return json.loads(chunk)
|
|
134
|
+
except:
|
|
135
|
+
return None
|
|
136
|
+
|
|
137
|
+
if self.config.stream_format == HttpStreamFormat.TEXT:
|
|
138
|
+
return chunk.decode("utf-8", errors="replace")
|
|
139
|
+
|
|
140
|
+
return chunk
|
|
141
|
+
|
|
111
142
|
@register_component(ComponentType.HTTP_CLIENT)
|
|
112
143
|
class HttpClientComponent(ComponentService):
|
|
113
144
|
def __init__(self, id: str, config: HttpClientComponentConfig, global_configs: ComponentGlobalConfigs, daemon: bool):
|
{model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/services/http_server.py
RENAMED
|
@@ -2,15 +2,16 @@ from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annot
|
|
|
2
2
|
from abc import ABC, abstractmethod
|
|
3
3
|
from mindor.dsl.schema.component import HttpServerComponentConfig
|
|
4
4
|
from mindor.dsl.schema.action import ActionConfig, HttpServerActionConfig, HttpServerCompletionType, HttpServerCompletionConfig
|
|
5
|
+
from mindor.dsl.schema.transport.http import HttpStreamFormat
|
|
5
6
|
from mindor.core.listener import HttpCallbackListener
|
|
6
|
-
from mindor.core.utils.http_client import HttpClient
|
|
7
|
+
from mindor.core.utils.http_client import HttpClient, HttpEventStreamResource
|
|
7
8
|
from mindor.core.utils.http_status import is_status_code_matched
|
|
8
9
|
from mindor.core.utils.time import parse_duration
|
|
9
10
|
from mindor.core.utils.shell import run_command_streaming
|
|
10
11
|
from ..base import ComponentService, ComponentType, ComponentGlobalConfigs, register_component
|
|
11
12
|
from ..context import ComponentActionContext
|
|
12
13
|
from datetime import datetime, timezone
|
|
13
|
-
import asyncio
|
|
14
|
+
import asyncio, json
|
|
14
15
|
|
|
15
16
|
class HttpServerCompletion(ABC):
|
|
16
17
|
def __init__(self, config: HttpServerCompletionConfig):
|
|
@@ -89,14 +90,44 @@ class HttpServerAction:
|
|
|
89
90
|
headers = await context.render_variable(self.config.headers)
|
|
90
91
|
|
|
91
92
|
response, result = await client.request(path or "", method, params, body, headers), None
|
|
93
|
+
|
|
94
|
+
if isinstance(response, HttpEventStreamResource) and context.contains_variable_reference("response[]", self.config.output):
|
|
95
|
+
async def _stream_generator(stream: HttpEventStreamResource):
|
|
96
|
+
async for chunk in stream:
|
|
97
|
+
context.register_source("response[]", self._convert_stream_chunk(chunk))
|
|
98
|
+
yield await context.render_variable(self.config.output, ignore_files=True)
|
|
99
|
+
|
|
100
|
+
return _stream_generator(response)
|
|
101
|
+
|
|
92
102
|
context.register_source("response", response)
|
|
93
103
|
|
|
94
104
|
if self.completion:
|
|
95
105
|
result = await self.completion.run(context, client)
|
|
106
|
+
|
|
107
|
+
if isinstance(result, HttpEventStreamResource) and context.contains_variable_reference("result[]", self.config.output):
|
|
108
|
+
async def _stream_generator(stream: HttpEventStreamResource):
|
|
109
|
+
async for chunk in stream:
|
|
110
|
+
context.register_source("result[]", self._convert_stream_chunk(chunk))
|
|
111
|
+
yield await context.render_variable(self.config.output, ignore_files=True)
|
|
112
|
+
|
|
113
|
+
return _stream_generator(result)
|
|
114
|
+
|
|
96
115
|
context.register_source("result", result)
|
|
97
116
|
|
|
98
117
|
return (await context.render_variable(self.config.output, ignore_files=True)) if self.config.output else (result or response)
|
|
99
118
|
|
|
119
|
+
def _convert_stream_chunk(self, chunk: bytes) -> Any:
|
|
120
|
+
if self.config.stream_format == HttpStreamFormat.JSON:
|
|
121
|
+
try:
|
|
122
|
+
return json.loads(chunk)
|
|
123
|
+
except:
|
|
124
|
+
return None
|
|
125
|
+
|
|
126
|
+
if self.config.stream_format == HttpStreamFormat.TEXT:
|
|
127
|
+
return chunk.decode("utf-8", errors="replace")
|
|
128
|
+
|
|
129
|
+
return chunk
|
|
130
|
+
|
|
100
131
|
@register_component(ComponentType.HTTP_SERVER)
|
|
101
132
|
class HttpServerComponent(ComponentService):
|
|
102
133
|
def __init__(self, id: str, config: HttpServerComponentConfig, global_configs: ComponentGlobalConfigs, daemon: bool):
|
|
@@ -63,8 +63,9 @@ class ImageToTextTaskAction:
|
|
|
63
63
|
if stream:
|
|
64
64
|
async def _stream_generator():
|
|
65
65
|
async for chunk in AsyncStreamer(streamer, loop):
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
if chunk:
|
|
67
|
+
context.register_source("result[]", chunk)
|
|
68
|
+
yield (await context.render_variable(self.config.output, ignore_files=True)) if self.config.output else chunk
|
|
68
69
|
|
|
69
70
|
return _stream_generator()
|
|
70
71
|
else:
|
|
@@ -75,8 +75,9 @@ class SummarizationTaskAction:
|
|
|
75
75
|
if stream:
|
|
76
76
|
async def _stream_generator():
|
|
77
77
|
async for chunk in AsyncStreamer(streamer, loop):
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
if chunk:
|
|
79
|
+
context.register_source("result[]", chunk)
|
|
80
|
+
yield (await context.render_variable(self.config.output, ignore_files=True)) if self.config.output else chunk
|
|
80
81
|
|
|
81
82
|
return _stream_generator()
|
|
82
83
|
else:
|
|
@@ -67,8 +67,9 @@ class TextGenerationTaskAction:
|
|
|
67
67
|
if stream:
|
|
68
68
|
async def _stream_generator():
|
|
69
69
|
async for chunk in AsyncStreamer(streamer, loop):
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
if chunk:
|
|
71
|
+
context.register_source("result[]", chunk)
|
|
72
|
+
yield (await context.render_variable(self.config.output, ignore_files=True)) if self.config.output else chunk
|
|
72
73
|
|
|
73
74
|
return _stream_generator()
|
|
74
75
|
else:
|
|
@@ -75,8 +75,9 @@ class TranslationTaskAction:
|
|
|
75
75
|
if stream:
|
|
76
76
|
async def _stream_generator():
|
|
77
77
|
async for chunk in AsyncStreamer(streamer, loop):
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
if chunk:
|
|
79
|
+
context.register_source("result[]", chunk)
|
|
80
|
+
yield (await context.render_variable(self.config.output, ignore_files=True)) if self.config.output else chunk
|
|
80
81
|
|
|
81
82
|
return _stream_generator()
|
|
82
83
|
else:
|
{model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/services/http_server.py
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annotated, AsyncIterator, Any
|
|
1
|
+
from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annotated, AsyncIterator, AsyncIterable, Any
|
|
2
2
|
from types import AsyncGeneratorType
|
|
3
3
|
from typing_extensions import Self
|
|
4
4
|
from pydantic import BaseModel
|
|
@@ -9,6 +9,7 @@ from mindor.dsl.schema.gateway import GatewayConfig
|
|
|
9
9
|
from mindor.dsl.schema.logger import LoggerConfig
|
|
10
10
|
from mindor.dsl.schema.workflow import WorkflowConfig, WorkflowVariableConfig, WorkflowVariableGroupConfig
|
|
11
11
|
from mindor.core.utils.http_request import parse_request_body, parse_options_header
|
|
12
|
+
from mindor.core.utils.http_response import HttpEventStreamer
|
|
12
13
|
from mindor.core.utils.http_client import HttpEventStreamResource
|
|
13
14
|
from mindor.core.utils.streaming import StreamResource
|
|
14
15
|
from ..base import ControllerService, ControllerType, WorkflowSchema, TaskState, TaskStatus, register_controller
|
|
@@ -16,7 +17,7 @@ from fastapi import FastAPI, APIRouter, Request, Body, HTTPException
|
|
|
16
17
|
from fastapi.middleware.cors import CORSMiddleware
|
|
17
18
|
from fastapi.responses import Response, JSONResponse, StreamingResponse
|
|
18
19
|
from starlette.background import BackgroundTask
|
|
19
|
-
import uvicorn
|
|
20
|
+
import uvicorn
|
|
20
21
|
|
|
21
22
|
class WorkflowTaskRequestBody(BaseModel):
|
|
22
23
|
workflow_id: Optional[str] = None
|
|
@@ -219,47 +220,29 @@ class HttpServerController(ControllerService):
|
|
|
219
220
|
if state.status == TaskStatus.FAILED:
|
|
220
221
|
raise HTTPException(status_code=500, detail=str(state.error))
|
|
221
222
|
|
|
222
|
-
if isinstance(state.output, AsyncIterator):
|
|
223
|
+
if isinstance(state.output, (HttpEventStreamResource, AsyncIterator)):
|
|
223
224
|
return self._render_async_iterator(state.output)
|
|
224
225
|
|
|
225
226
|
if isinstance(state.output, StreamResource):
|
|
226
227
|
return self._render_stream_resource(state.output)
|
|
227
228
|
|
|
228
229
|
return JSONResponse(content=state.output)
|
|
229
|
-
|
|
230
|
-
def _render_async_iterator(self, iterator: AsyncIterator) -> Response:
|
|
231
|
-
async def _event_generator() -> AsyncIterator[bytes]:
|
|
232
|
-
async for chunk in iterator:
|
|
233
|
-
if not isinstance(chunk, (str, bytes)):
|
|
234
|
-
chunk = json.dumps(chunk, ensure_ascii=False, default=str)
|
|
235
|
-
if isinstance(chunk, str):
|
|
236
|
-
chunk = chunk.replace("\r\n", "\n")
|
|
237
|
-
if chunk.endswith("\n"):
|
|
238
|
-
lines = chunk.split("\n")
|
|
239
|
-
if chunk.startswith("\n"):
|
|
240
|
-
lines = lines[1:]
|
|
241
|
-
chunk = [ line.encode("utf-8") for line in lines ]
|
|
242
|
-
else:
|
|
243
|
-
chunk = chunk.encode("utf-8")
|
|
244
|
-
for line in [ chunk ] if isinstance(chunk, bytes) else chunk:
|
|
245
|
-
yield b"data: " + line + b"\n"
|
|
246
|
-
yield b"\n"
|
|
247
230
|
|
|
231
|
+
def _render_async_iterator(self, iterator: AsyncIterable[Any]) -> Response:
|
|
248
232
|
return StreamingResponse(
|
|
249
|
-
|
|
233
|
+
HttpEventStreamer(iterator).stream(),
|
|
250
234
|
media_type="text/event-stream",
|
|
251
|
-
headers={
|
|
235
|
+
headers={
|
|
236
|
+
"Cache-Control": "no-cache"
|
|
237
|
+
}
|
|
252
238
|
)
|
|
253
239
|
|
|
254
240
|
def _render_stream_resource(self, resource: StreamResource) -> Response:
|
|
255
|
-
async def _close_stream():
|
|
256
|
-
await resource.close()
|
|
257
|
-
|
|
258
241
|
return StreamingResponse(
|
|
259
242
|
resource,
|
|
260
243
|
media_type=resource.content_type,
|
|
261
244
|
headers=self._build_stream_resource_headers(resource),
|
|
262
|
-
background=BackgroundTask(
|
|
245
|
+
background=BackgroundTask(resource.close)
|
|
263
246
|
)
|
|
264
247
|
|
|
265
248
|
def _build_stream_resource_headers(self, resource: StreamResource) -> Dict[str, str]:
|
|
@@ -40,7 +40,7 @@ class HttpEventStreamResource(StreamResource):
|
|
|
40
40
|
|
|
41
41
|
self.response: aiohttp.ClientResponse = response
|
|
42
42
|
self.stream: aiohttp.StreamReader = response.content
|
|
43
|
-
self._buffer:
|
|
43
|
+
self._buffer: bytearray = bytearray()
|
|
44
44
|
|
|
45
45
|
async def close(self) -> None:
|
|
46
46
|
self.response.close()
|
|
@@ -48,18 +48,29 @@ class HttpEventStreamResource(StreamResource):
|
|
|
48
48
|
self.stream = None
|
|
49
49
|
|
|
50
50
|
async def _iterate_stream(self) -> AsyncIterator[bytes]:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
51
|
+
async for chunk in self.stream:
|
|
52
|
+
self._buffer += chunk.replace(b"\r\n", b"\n")
|
|
53
|
+
|
|
54
|
+
while True:
|
|
55
|
+
pos = self._buffer.find(b"\n\n")
|
|
56
|
+
if pos < 0:
|
|
57
|
+
break
|
|
58
|
+
|
|
59
|
+
block, self._buffer = self._buffer[:pos], self._buffer[pos + 2:]
|
|
60
|
+
parts = []
|
|
61
|
+
|
|
62
|
+
for line in block.split(b"\n"):
|
|
63
|
+
if line.startswith(b"data:"):
|
|
64
|
+
parts.append(line[5:].lstrip(b" "))
|
|
65
|
+
continue
|
|
66
|
+
if line == b"data":
|
|
67
|
+
parts.append(b"")
|
|
68
|
+
continue
|
|
69
|
+
if line.startswith(b":"): # comment
|
|
70
|
+
continue
|
|
71
|
+
|
|
72
|
+
if parts:
|
|
73
|
+
yield b"\n".join(parts)
|
|
63
74
|
|
|
64
75
|
class HttpClient:
|
|
65
76
|
shared_instance: Optional["HttpClient"] = None
|
|
@@ -94,7 +105,7 @@ class HttpClient:
|
|
|
94
105
|
if raise_on_error and response.status >= 400:
|
|
95
106
|
raise ValueError(f"Request failed with status {response.status}: {content}")
|
|
96
107
|
|
|
97
|
-
if not isinstance(content,
|
|
108
|
+
if not isinstance(content, StreamResource):
|
|
98
109
|
response.close()
|
|
99
110
|
|
|
100
111
|
return content if raise_on_error else (content, response.status)
|
|
@@ -157,7 +168,7 @@ class HttpClient:
|
|
|
157
168
|
return (await response.json(), content_type)
|
|
158
169
|
|
|
159
170
|
if content_type == "text/event-stream":
|
|
160
|
-
return (HttpEventStreamResource(response)
|
|
171
|
+
return (HttpEventStreamResource(response), content_type)
|
|
161
172
|
|
|
162
173
|
if content_type.startswith("text/"):
|
|
163
174
|
return (await response.text(), content_type)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annotated, AsyncIterator, AsyncIterable, Any
|
|
2
|
+
import json
|
|
3
|
+
|
|
4
|
+
class HttpEventStreamer:
|
|
5
|
+
def __init__(self, iterator: AsyncIterable[Any]):
|
|
6
|
+
self.iterator: AsyncIterable[Any] = iterator
|
|
7
|
+
|
|
8
|
+
async def stream(self) -> AsyncIterator[bytes]:
|
|
9
|
+
async for chunk in self.iterator:
|
|
10
|
+
if not isinstance(chunk, (str, bytes)):
|
|
11
|
+
chunk = json.dumps(chunk, ensure_ascii=False, default=str)
|
|
12
|
+
|
|
13
|
+
if isinstance(chunk, str):
|
|
14
|
+
if chunk.endswith("\n"):
|
|
15
|
+
lines = chunk.split("\n")
|
|
16
|
+
if chunk.startswith("\n"):
|
|
17
|
+
lines = lines[1:]
|
|
18
|
+
chunk = [ line.encode("utf-8") for line in lines ]
|
|
19
|
+
else:
|
|
20
|
+
chunk = chunk.encode("utf-8")
|
|
21
|
+
|
|
22
|
+
for line in [ chunk ] if isinstance(chunk, bytes) else chunk:
|
|
23
|
+
yield b"data: " + line + b"\n"
|
|
24
|
+
|
|
25
|
+
yield b"\n"
|
{model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/action/impl/http_client.py
RENAMED
|
@@ -2,6 +2,7 @@ from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annot
|
|
|
2
2
|
from enum import Enum
|
|
3
3
|
from pydantic import BaseModel, Field
|
|
4
4
|
from pydantic import model_validator
|
|
5
|
+
from mindor.dsl.schema.transport.http import HttpStreamFormat
|
|
5
6
|
from .common import CommonActionConfig
|
|
6
7
|
|
|
7
8
|
class HttpClientCompletionType(str, Enum):
|
|
@@ -10,6 +11,7 @@ class HttpClientCompletionType(str, Enum):
|
|
|
10
11
|
|
|
11
12
|
class HttpClientCommonCompletionConfig(BaseModel):
|
|
12
13
|
type: HttpClientCompletionType
|
|
14
|
+
stream_format: Optional[HttpStreamFormat] = Field(default=None, description="Format of stream payload.")
|
|
13
15
|
|
|
14
16
|
class HttpClientPollingCompletionConfig(HttpClientCommonCompletionConfig):
|
|
15
17
|
type: Literal[HttpClientCompletionType.POLLING]
|
|
@@ -57,6 +59,7 @@ class HttpClientActionConfig(CommonActionConfig):
|
|
|
57
59
|
headers: Dict[str, str] = Field(default_factory=dict, description="")
|
|
58
60
|
body: Dict[str, Any] = Field(default_factory=dict, description="")
|
|
59
61
|
params: Dict[str, str] = Field(default_factory=dict, description="")
|
|
62
|
+
stream_format: Optional[HttpStreamFormat] = Field(default=None, description="Format of stream payload.")
|
|
60
63
|
completion: Optional[HttpClientCompletionConfig] = Field(default=None, description="")
|
|
61
64
|
|
|
62
65
|
@model_validator(mode="before")
|
{model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/dsl/schema/action/impl/http_server.py
RENAMED
|
@@ -2,6 +2,7 @@ from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annot
|
|
|
2
2
|
from enum import Enum
|
|
3
3
|
from pydantic import BaseModel, Field
|
|
4
4
|
from pydantic import model_validator
|
|
5
|
+
from mindor.dsl.schema.transport.http import HttpStreamFormat
|
|
5
6
|
from .common import CommonActionConfig
|
|
6
7
|
|
|
7
8
|
class HttpServerCompletionType(str, Enum):
|
|
@@ -10,6 +11,7 @@ class HttpServerCompletionType(str, Enum):
|
|
|
10
11
|
|
|
11
12
|
class HttpServerCommonCompletionConfig(BaseModel):
|
|
12
13
|
type: HttpServerCompletionType
|
|
14
|
+
stream_format: Optional[HttpStreamFormat] = Field(default=None, description="Format of stream payload.")
|
|
13
15
|
|
|
14
16
|
class HttpServerPollingCompletionConfig(HttpServerCommonCompletionConfig):
|
|
15
17
|
type: Literal[HttpServerCompletionType.POLLING]
|
|
@@ -49,4 +51,5 @@ class HttpServerActionConfig(CommonActionConfig):
|
|
|
49
51
|
headers: Dict[str, str] = Field(default_factory=dict, description="")
|
|
50
52
|
body: Dict[str, Any] = Field(default_factory=dict, description="")
|
|
51
53
|
params: Dict[str, str] = Field(default_factory=dict, description="")
|
|
54
|
+
stream_format: Optional[HttpStreamFormat] = Field(default=None, description="Format of stream payload.")
|
|
52
55
|
completion: Optional[HttpServerCompletionConfig] = Field(default=None, description="")
|
|
@@ -79,6 +79,7 @@ src/mindor/core/utils/__init__.py
|
|
|
79
79
|
src/mindor/core/utils/caching.py
|
|
80
80
|
src/mindor/core/utils/http_client.py
|
|
81
81
|
src/mindor/core/utils/http_request.py
|
|
82
|
+
src/mindor/core/utils/http_response.py
|
|
82
83
|
src/mindor/core/utils/http_status.py
|
|
83
84
|
src/mindor/core/utils/image.py
|
|
84
85
|
src/mindor/core/utils/mcp_client.py
|
|
@@ -211,6 +212,7 @@ src/mindor/dsl/schema/runtime/impl/docker.py
|
|
|
211
212
|
src/mindor/dsl/schema/runtime/impl/native.py
|
|
212
213
|
src/mindor/dsl/schema/runtime/impl/types.py
|
|
213
214
|
src/mindor/dsl/schema/transport/__init__.py
|
|
215
|
+
src/mindor/dsl/schema/transport/http.py
|
|
214
216
|
src/mindor/dsl/schema/transport/ssh.py
|
|
215
217
|
src/mindor/dsl/utils/__init__.py
|
|
216
218
|
src/mindor/dsl/utils/annotation.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/services/__init__.py
RENAMED
|
File without changes
|
{model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/services/mcp_client.py
RENAMED
|
File without changes
|
{model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/services/mcp_server.py
RENAMED
|
File without changes
|
{model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/services/model/__init__.py
RENAMED
|
File without changes
|
{model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/services/model/base.py
RENAMED
|
File without changes
|
{model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/services/model/model.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/services/text_splitter.py
RENAMED
|
File without changes
|
{model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/component/services/workflow.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/runner/http_client.py
RENAMED
|
File without changes
|
{model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/runner/mcp_client.py
RENAMED
|
File without changes
|
|
File without changes
|
{model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/runtime/__init__.py
RENAMED
|
File without changes
|
{model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/runtime/docker/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/runtime/docker/docker.py
RENAMED
|
File without changes
|
{model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/runtime/native/__init__.py
RENAMED
|
File without changes
|
{model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/runtime/native/native.py
RENAMED
|
File without changes
|
|
File without changes
|
{model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/services/__init__.py
RENAMED
|
File without changes
|
{model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/controller/services/mcp_server.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/gateway/services/http_tunnel.py
RENAMED
|
File without changes
|
{model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/gateway/services/ssh_tunnel.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{model_compose-0.3.11 → model_compose-0.3.12}/src/mindor/core/listener/services/http_callback.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|