dashscope 1.27.5__tar.gz → 1.27.7__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.
- {dashscope-1.27.5 → dashscope-1.27.7}/PKG-INFO +4 -3
- {dashscope-1.27.5 → dashscope-1.27.7}/README.md +2 -2
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/__init__.py +1 -1
- dashscope-1.27.7/dashscope/acli/acceptance.py +355 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/agent.py +349 -78
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/agents/delegate.py +14 -18
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/agents/subagent.py +3 -3
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/agents/subagents.py +31 -9
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/__init__.py +10 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/dispatch.py +9 -1
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/handlers_misc.py +41 -33
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/runners.py +105 -3
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/compression.py +54 -3
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/config.py +9 -1
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/agent.md +9 -4
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/cli.md +15 -4
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/system-prompt.md +10 -5
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/executor.py +264 -14
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/memory/manager.py +22 -3
- dashscope-1.27.7/dashscope/acli/memory/reflection.py +727 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/prompt_pipeline.py +11 -3
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/providers/anthropic.py +22 -2
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/providers/hardening.py +61 -7
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/providers/tongyi.py +89 -10
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/scheduler.py +3 -1
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/skills/base.py +12 -7
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/tools/filesystem.py +79 -17
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/tools/shell.py +216 -58
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/tools/skills.py +4 -1
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/utils/messages.py +9 -2
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/utils/paths.py +47 -8
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/utils/text.py +38 -3
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/resources/sessions.py +26 -2
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/types/models.py +2 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/types/params.py +59 -10
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/qwen_omni/omni_realtime.py +7 -10
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/__init__.py +56 -21
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/agentic_rl.py +11 -4
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/deployments.py +2 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/agentic_rl.py +225 -2
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/deployments.py +1 -1
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/__init__.py +4 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/common/constants.py +8 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/common/model.py +236 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/common/model_types.py +1 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/common/utils.py +25 -7
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/data/base_data_model.py +11 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/data/reward_output.py +13 -2
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/data/rollout_output.py +13 -2
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/version.py +1 -1
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope.egg-info/PKG-INFO +4 -3
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope.egg-info/SOURCES.txt +1 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/setup.py +2 -1
- dashscope-1.27.5/dashscope/acli/memory/reflection.py +0 -337
- {dashscope-1.27.5 → dashscope-1.27.7}/LICENSE +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/LICENSE.certifi +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/MANIFEST.in +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/NOTICE +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/__init__.pyi +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/__main__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/agents/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/audit.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/capabilities/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/capabilities/local_memory.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/completer.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/constants.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/examples.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/handlers_capability.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/handlers_config.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/handlers_device.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/handlers_key.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/handlers_profile.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/handlers_provider.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/handlers_session.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/handlers_setup.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/handlers_skill.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/mcp.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/multimodal.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/repl.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/startup.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/streaming.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/commands.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/debuglog.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/deliverable.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/dev.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/eval/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/basic-chat/.acli/config.toml +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/basic-chat/.acli/custom-extensions.toml +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/basic-chat/.acli/hooks.toml +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/basic-chat/.acli/skills/explain-code.md +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/basic-chat/.acli/skills/research-topic.md +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/basic-chat/.acli/skills/translate.md +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/basic-chat/.acli/skills/write-poem.md +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/basic-chat/.acli/system-prompt.md +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/basic-chat/README.md +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/config.toml +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/custom-extensions.toml +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/hooks.toml +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/api-doc.md +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/diagnose.md +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/error-code.md +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/explain-code.md +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/fine-tuning.md +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/multimodal.md +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/retrieval.md +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/sdk-example.md +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/speech.md +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/text-generation.md +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/translate.md +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/README.md +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/extensions.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/hooks.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/mcp_server.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/mcp_stdio.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/memory/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/memory/directives_learning.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/memory/experience.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/memory/plan.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/memory/skill_evolution.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/memory/tool_chains.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/memory/trace.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/permission.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/platforms/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/platforms/bailian/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/platforms/bailian/cli.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/platforms/bailian/mcp.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/platforms/base.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/platforms/local/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/platforms/local/history.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/platforms/local/memory.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/prompt.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/providers/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/providers/adapter.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/providers/base.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/providers/openai.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/providers/profile.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/sandbox.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/sdk.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/session.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/session_events.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/skills/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/skills/manager.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/skills/package.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/skills/store.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/tools/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/tools/browser.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/tools/camera.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/tools/checkpoint.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/tools/evolution.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/tools/platform.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/tools/registry.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/tools/session.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/tools/vision.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/tools/web_search.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/ui/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/ui/camera.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/ui/embedded.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/ui/tts.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/ui/tui.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/ui/voice.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/utils/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/utils/clipboard.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/utils/crypto.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/utils/exceptions.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/utils/ids.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/utils/images.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/utils/keywords.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/utils/sanitizer.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/utils/spinner.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/utils/template.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/utils/toml.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/utils/validation.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/client.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/constants.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/exceptions.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/pagination.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/resources/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/resources/_helpers.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/resources/agents.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/resources/deployments.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/resources/environments.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/resources/files.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/resources/security.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/resources/session_events.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/resources/session_resources.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/resources/session_threads.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/resources/skills.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/resources/vaults.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/resources/webhook_endpoints.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/streaming.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/transport.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/types/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/aigc/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/aigc/chat_completion.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/aigc/code_generation.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/aigc/conversation.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/aigc/generation.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/aigc/image_generation.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/aigc/image_synthesis.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/aigc/multimodal_conversation.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/aigc/video_synthesis.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/api_entities/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/api_entities/aio_session.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/api_entities/aiohttp_request.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/api_entities/api_request_data.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/api_entities/api_request_factory.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/api_entities/base_request.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/api_entities/chat_completion_types.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/api_entities/dashscope_response.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/api_entities/encryption.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/api_entities/http_request.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/api_entities/websocket_request.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/app/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/app/application.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/app/application_response.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/assistants/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/assistants/assistant_types.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/assistants/assistants.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/assistants/files.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/asr/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/asr/asr_phrase_manager.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/asr/recognition.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/asr/transcription.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/asr/translation_recognizer.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/asr/vocabulary.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/http_tts/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/http_tts/http_speech_synthesizer.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/qwen_asr/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/qwen_asr/qwen_transcription.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/qwen_omni/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/qwen_tts/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/qwen_tts/speech_synthesizer.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/qwen_tts_realtime/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/qwen_tts_realtime/qwen_tts_realtime.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/tts/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/tts/speech_synthesizer.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/tts_v2/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/tts_v2/enrollment.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/tts_v2/speech_synthesizer.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/__main__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/application.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/auth.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/code_generation.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/common.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/embeddings.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/files.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/fine_tunes.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/generation.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/image_generation.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/image_synthesis.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/models.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/multimodal_conversation.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/multimodal_embedding.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/oss.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/rerank.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/speech_synthesis.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/tokenization.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/transcription.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/understanding.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/video_synthesis.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/client/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/client/base_api.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/common/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/common/api_key.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/common/base_type.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/common/constants.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/common/env.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/common/error.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/common/logging.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/common/message_manager.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/common/utils.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/embeddings/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/embeddings/batch_text_embedding.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/embeddings/batch_text_embedding_response.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/embeddings/multimodal_embedding.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/embeddings/text_embedding.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/files.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/customize_types.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/finetunes.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/common/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/common/errors.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/common/log.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/data/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/data/group_reward_input.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/data/group_reward_output.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/data/reward_input.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/data/rollout_input.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/demo/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/demo/group_reward_processor_demo.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/demo/reward_processor_demo.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/demo/rollout_processor_demo.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/func_decorator.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/func_manager.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/observability/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/observability/genai/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/observability/genai/_core.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/observability/genai/llm_dashscope.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/observability/genai/llm_openai.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/observability/genai/llm_span.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/observability/genai/messages.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/observability/genai/tools.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/observability/processor_span.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/observability/tracing.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/parser/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/parser/base_parser.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/parser/group_reward_parser.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/parser/reward_parser.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/parser/rollout_parser.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/processor/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/processor/abstract_group_reward_processor.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/processor/abstract_processor.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/processor/abstract_reward_processor.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/processor/abstract_rollout_processor.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/server/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/server/server.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/io/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/io/input_output.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/model.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/models.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/multimodal/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/multimodal/dialog_state.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/multimodal/multimodal_constants.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/multimodal/multimodal_dialog.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/multimodal/multimodal_request_params.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/multimodal/tingwu/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/multimodal/tingwu/tingwu.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/multimodal/tingwu/tingwu_realtime.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/nlp/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/nlp/understanding.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/protocol/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/protocol/websocket.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/py.typed +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/rerank/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/rerank/text_rerank.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/resources/qwen.tiktoken +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/threads/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/threads/messages/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/threads/messages/files.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/threads/messages/messages.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/threads/runs/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/threads/runs/runs.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/threads/runs/steps.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/threads/thread_types.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/threads/threads.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/tokenizers/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/tokenizers/qwen_tokenizer.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/tokenizers/tokenization.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/tokenizers/tokenizer.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/tokenizers/tokenizer_base.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/utils/__init__.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/utils/message_utils.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/utils/oss_utils.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/utils/param_utils.py +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope.egg-info/dependency_links.txt +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope.egg-info/entry_points.txt +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope.egg-info/not-zip-safe +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope.egg-info/requires.txt +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/dashscope.egg-info/top_level.txt +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/requirements.txt +0 -0
- {dashscope-1.27.5 → dashscope-1.27.7}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dashscope
|
|
3
|
-
Version: 1.27.
|
|
3
|
+
Version: 1.27.7
|
|
4
4
|
Summary: dashscope client sdk library
|
|
5
5
|
Home-page: https://dashscope.aliyun.com/
|
|
6
6
|
Author: Alibaba Cloud
|
|
@@ -17,6 +17,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
20
21
|
Requires-Python: >=3.9
|
|
21
22
|
Description-Content-Type: text/markdown
|
|
22
23
|
License-File: LICENSE
|
|
@@ -87,7 +88,7 @@ The DashScope Python SDK provides a comprehensive interface to [Alibaba Cloud Mo
|
|
|
87
88
|
|
|
88
89
|
## What is New
|
|
89
90
|
|
|
90
|
-
**v1.27.0 ships an interactive AI assistant — [DashScope SDK Expert](#ai-assistant-dashscope-sdk-expert).** Run `dashscope` with no arguments (or ask directly
|
|
91
|
+
**v1.27.0 ships an interactive AI assistant — [DashScope SDK Expert](#ai-assistant-dashscope-sdk-expert).** Run `dashscope` with no arguments (or ask directly with `dashscope expert "how do I stream Generation output"`) to get SDK/API answers, runnable examples, CLI usage, and error diagnosis right in your terminal. Guidance is drawn from per-domain quick-reference skills (text, multimodal, speech, retrieval, fine-tuning, agent, cli) built on the SDK's public interfaces — parameters, outputs, and error codes — so you can ask instead of reading the docs. Type `/help` inside the assistant to view available commands.
|
|
91
92
|
|
|
92
93
|
## Installation
|
|
93
94
|
To install the DashScope Python SDK, simply run:
|
|
@@ -256,7 +257,7 @@ A complete runnable example is available in [`samples/set_region_example.py`](sa
|
|
|
256
257
|
The SDK ships with an interactive AI assistant, **DashScope SDK Expert**, built on the bundled Agentic CLI (`dashscope/acli`) framework. For DashScope SDK/CLI users it is the recommended way to get development consultation and AI coding help — answering SDK/API questions, generating runnable examples, showing CLI usage, and diagnosing errors, right in your terminal.
|
|
257
258
|
|
|
258
259
|
- Run `dashscope` with no arguments to start the assistant. On first run it offers to install the SDK Expert knowledge pack (per-domain quick-reference skills: text, multimodal, speech, retrieval, fine-tuning, agent, cli), so guidance comes from the SDK's public interfaces — parameters, outputs, error codes — without reading the source
|
|
259
|
-
- Ask it instead of reading docs — e.g. `dashscope "how do I stream Generation output"` or `dashscope "CLI command to cancel a fine-tuning job"
|
|
260
|
+
- Ask it instead of reading docs — e.g. `dashscope expert "how do I stream Generation output"` or `dashscope expert "CLI command to cancel a fine-tuning job"`, each of which asks once and exits. Type `/help` inside the assistant to list available commands (`/setup`, `/skill`, `/stats`, ...); classic SDK subcommands still work, plain `dashscope expert` enters the assistant interactively, and `dashscope expert --help` shows all the forms
|
|
260
261
|
- Full walkthrough: [DashScope SDK Expert guide](https://help.aliyun.com/en/model-studio/dashscope-sdk-expert)
|
|
261
262
|
|
|
262
263
|
## Supported Models
|
|
@@ -6,7 +6,7 @@ The DashScope Python SDK provides a comprehensive interface to [Alibaba Cloud Mo
|
|
|
6
6
|
|
|
7
7
|
## What is New
|
|
8
8
|
|
|
9
|
-
**v1.27.0 ships an interactive AI assistant — [DashScope SDK Expert](#ai-assistant-dashscope-sdk-expert).** Run `dashscope` with no arguments (or ask directly
|
|
9
|
+
**v1.27.0 ships an interactive AI assistant — [DashScope SDK Expert](#ai-assistant-dashscope-sdk-expert).** Run `dashscope` with no arguments (or ask directly with `dashscope expert "how do I stream Generation output"`) to get SDK/API answers, runnable examples, CLI usage, and error diagnosis right in your terminal. Guidance is drawn from per-domain quick-reference skills (text, multimodal, speech, retrieval, fine-tuning, agent, cli) built on the SDK's public interfaces — parameters, outputs, and error codes — so you can ask instead of reading the docs. Type `/help` inside the assistant to view available commands.
|
|
10
10
|
|
|
11
11
|
## Installation
|
|
12
12
|
To install the DashScope Python SDK, simply run:
|
|
@@ -175,7 +175,7 @@ A complete runnable example is available in [`samples/set_region_example.py`](sa
|
|
|
175
175
|
The SDK ships with an interactive AI assistant, **DashScope SDK Expert**, built on the bundled Agentic CLI (`dashscope/acli`) framework. For DashScope SDK/CLI users it is the recommended way to get development consultation and AI coding help — answering SDK/API questions, generating runnable examples, showing CLI usage, and diagnosing errors, right in your terminal.
|
|
176
176
|
|
|
177
177
|
- Run `dashscope` with no arguments to start the assistant. On first run it offers to install the SDK Expert knowledge pack (per-domain quick-reference skills: text, multimodal, speech, retrieval, fine-tuning, agent, cli), so guidance comes from the SDK's public interfaces — parameters, outputs, error codes — without reading the source
|
|
178
|
-
- Ask it instead of reading docs — e.g. `dashscope "how do I stream Generation output"` or `dashscope "CLI command to cancel a fine-tuning job"
|
|
178
|
+
- Ask it instead of reading docs — e.g. `dashscope expert "how do I stream Generation output"` or `dashscope expert "CLI command to cancel a fine-tuning job"`, each of which asks once and exits. Type `/help` inside the assistant to list available commands (`/setup`, `/skill`, `/stats`, ...); classic SDK subcommands still work, plain `dashscope expert` enters the assistant interactively, and `dashscope expert --help` shows all the forms
|
|
179
179
|
- Full walkthrough: [DashScope SDK Expert guide](https://help.aliyun.com/en/model-studio/dashscope-sdk-expert)
|
|
180
180
|
|
|
181
181
|
## Supported Models
|
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
"""Hard acceptance gate for autonomous (oneshot) runs.
|
|
3
|
+
|
|
4
|
+
The system prompt already asks the model to verify its work before reporting
|
|
5
|
+
completion, and the model already ignores that. Aider's ``--auto-test`` and
|
|
6
|
+
Agentless' three-stage filter make verification a property of the loop rather
|
|
7
|
+
than a request: a non-zero exit means the answer is not accepted yet.
|
|
8
|
+
OpenHands shipping the advice without the gate is the counterexample.
|
|
9
|
+
|
|
10
|
+
Only oneshot runs are gated. Interactively the user *is* the acceptance
|
|
11
|
+
criterion and is reading the output, so spending minutes on a test suite
|
|
12
|
+
before every reply costs more than the near-miss it prevents.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
|
|
17
|
+
import asyncio
|
|
18
|
+
import os
|
|
19
|
+
import shlex
|
|
20
|
+
import sys
|
|
21
|
+
from dataclasses import dataclass
|
|
22
|
+
from pathlib import Path
|
|
23
|
+
|
|
24
|
+
from dashscope.acli.utils.text import markdown_fence, truncate_head_tail
|
|
25
|
+
|
|
26
|
+
# Quoted verbatim into the next prompt, so: large enough to contain the
|
|
27
|
+
# failing test id and its assertion, small enough to read. Tail-biased,
|
|
28
|
+
# because that is where pytest and cargo put the verdict.
|
|
29
|
+
_OUTPUT_CHARS = 3000
|
|
30
|
+
|
|
31
|
+
DEFAULT_RETRIES = 1
|
|
32
|
+
DEFAULT_TIMEOUT = 600
|
|
33
|
+
|
|
34
|
+
EXPLICIT = "explicit"
|
|
35
|
+
DISCOVERED = "discovered"
|
|
36
|
+
|
|
37
|
+
# Exit statuses meaning the check never reached the code under test, so its
|
|
38
|
+
# output describes the environment rather than the change. 127 is the shell's
|
|
39
|
+
# command-not-found; 2/3/4/5 are pytest's interrupted (also what a collection
|
|
40
|
+
# error such as a missing dependency reports), internal-error, usage-error and
|
|
41
|
+
# nothing-collected. pytest's 1 is deliberately absent: tests ran and one
|
|
42
|
+
# failed, which is the verdict this whole module exists to act on.
|
|
43
|
+
_NOT_FOUND = 127
|
|
44
|
+
_PYTEST_NEVER_RAN = frozenset({2, 3, 4, 5})
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def _never_ran(run: AcceptanceRun) -> bool:
|
|
48
|
+
"""True when ``run``'s exit status shows the check could not execute."""
|
|
49
|
+
if run.exit_code == _NOT_FOUND:
|
|
50
|
+
return True
|
|
51
|
+
return "pytest" in run.command and run.exit_code in _PYTEST_NEVER_RAN
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def _env_int(name: str, default: int) -> int:
|
|
55
|
+
try:
|
|
56
|
+
return int(os.environ.get(name, "") or default)
|
|
57
|
+
except ValueError:
|
|
58
|
+
return default
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def _env_flag(name: str, default: bool) -> bool:
|
|
62
|
+
raw = os.environ.get(name)
|
|
63
|
+
if raw is None or not raw.strip():
|
|
64
|
+
return default
|
|
65
|
+
return raw.strip().lower() not in ("0", "false", "no", "off")
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def _read_head(path: Path, limit: int = 65536) -> str:
|
|
69
|
+
try:
|
|
70
|
+
with path.open("r", encoding="utf-8", errors="replace") as fh:
|
|
71
|
+
return fh.read(limit)
|
|
72
|
+
except OSError:
|
|
73
|
+
return ""
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def _is_pytest_project(root: Path) -> bool:
|
|
77
|
+
if (root / "pytest.ini").is_file():
|
|
78
|
+
return True
|
|
79
|
+
for name, marker in (
|
|
80
|
+
("pyproject.toml", "[tool.pytest"),
|
|
81
|
+
("setup.cfg", "[tool:pytest]"),
|
|
82
|
+
("tox.ini", "[pytest]"),
|
|
83
|
+
):
|
|
84
|
+
path = root / name
|
|
85
|
+
if path.is_file() and marker in _read_head(path):
|
|
86
|
+
return True
|
|
87
|
+
# Most Python repos never declare pytest config at all. A tests/ directory
|
|
88
|
+
# beside a project file is pytest's default layout, and is what bare
|
|
89
|
+
# `pytest` collects.
|
|
90
|
+
return (root / "tests").is_dir() and (root / "pyproject.toml").is_file()
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def discover_acceptance_command(
|
|
94
|
+
cwd: str | os.PathLike[str] | None = None,
|
|
95
|
+
) -> str | None:
|
|
96
|
+
"""The conventional test entry point for the project at ``cwd``, if any.
|
|
97
|
+
|
|
98
|
+
The allowlist is deliberately short. Every entry runs code from the
|
|
99
|
+
repository — ``conftest.py`` at collection time, ``build.rs``, ``TestMain``
|
|
100
|
+
— so "conservative" here means "a standard test entry point for an
|
|
101
|
+
ecosystem whose manifest is sitting right here", not "harmless".
|
|
102
|
+
``npm test`` and ``make test`` are excluded because their bodies are
|
|
103
|
+
arbitrary user scripts with no conventional meaning; declaring them via
|
|
104
|
+
``ACLI_ACCEPTANCE_CMD`` is how you ask for those.
|
|
105
|
+
"""
|
|
106
|
+
root = Path(cwd or os.getcwd())
|
|
107
|
+
if not root.is_dir():
|
|
108
|
+
return None
|
|
109
|
+
if _is_pytest_project(root):
|
|
110
|
+
# This interpreter, not a bare `pytest`: the gate must run against the
|
|
111
|
+
# same environment the agent's own run_command calls use.
|
|
112
|
+
return f"{shlex.quote(sys.executable)} -m pytest -q"
|
|
113
|
+
if (root / "Cargo.toml").is_file():
|
|
114
|
+
return "cargo test --quiet"
|
|
115
|
+
if (root / "go.mod").is_file():
|
|
116
|
+
return "go test ./..."
|
|
117
|
+
return None
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
@dataclass(frozen=True)
|
|
121
|
+
class AcceptanceRun:
|
|
122
|
+
"""One execution of the acceptance check."""
|
|
123
|
+
|
|
124
|
+
command: str
|
|
125
|
+
source: str
|
|
126
|
+
ok: bool
|
|
127
|
+
exit_code: int | None
|
|
128
|
+
output: str
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
@dataclass(frozen=True)
|
|
132
|
+
class GateVerdict:
|
|
133
|
+
"""What the loop should do about a check that did not pass.
|
|
134
|
+
|
|
135
|
+
At most one of ``rejection`` and ``note`` is non-empty. ``rejection``
|
|
136
|
+
withholds the answer and sends the model back with the raw output;
|
|
137
|
+
``note`` is appended to the final answer when sending it back would not
|
|
138
|
+
help.
|
|
139
|
+
"""
|
|
140
|
+
|
|
141
|
+
run: AcceptanceRun
|
|
142
|
+
rejection: str = ""
|
|
143
|
+
note: str = ""
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
class AcceptanceGate:
|
|
147
|
+
"""Runs the acceptance check and decides whether the answer stands.
|
|
148
|
+
|
|
149
|
+
Two runs per turn at most: a baseline captured before the first mutation,
|
|
150
|
+
and the check at the loop's exit. The baseline is what turns "the suite is
|
|
151
|
+
red" into "you made it red" — Agentless reproduces the issue on the
|
|
152
|
+
unpatched repository for the same reason, and AlphaCodium's test anchors
|
|
153
|
+
are the same obligation stated positively.
|
|
154
|
+
"""
|
|
155
|
+
|
|
156
|
+
def __init__(
|
|
157
|
+
self,
|
|
158
|
+
command: str = "",
|
|
159
|
+
source: str = EXPLICIT,
|
|
160
|
+
retries: int = DEFAULT_RETRIES,
|
|
161
|
+
timeout: int = DEFAULT_TIMEOUT,
|
|
162
|
+
):
|
|
163
|
+
self.command = command
|
|
164
|
+
self.source = source
|
|
165
|
+
self.retries = retries
|
|
166
|
+
self.timeout = timeout
|
|
167
|
+
self.baseline: AcceptanceRun | None = None
|
|
168
|
+
self.attempts = 0
|
|
169
|
+
self._baseline_task: asyncio.Task | None = None
|
|
170
|
+
|
|
171
|
+
@classmethod
|
|
172
|
+
def from_env(cls, oneshot: bool) -> AcceptanceGate:
|
|
173
|
+
"""Build the gate from the ``ACLI_ACCEPTANCE*`` environment variables.
|
|
174
|
+
|
|
175
|
+
An explicit command wins over discovery. Setting ``ACLI_ACCEPTANCE=0``
|
|
176
|
+
turns the gate off, which is what a benchmark measuring raw model
|
|
177
|
+
output wants.
|
|
178
|
+
"""
|
|
179
|
+
if not (oneshot and _env_flag("ACLI_ACCEPTANCE", True)):
|
|
180
|
+
return cls()
|
|
181
|
+
command = os.environ.get("ACLI_ACCEPTANCE_CMD", "").strip()
|
|
182
|
+
source = EXPLICIT
|
|
183
|
+
if not command:
|
|
184
|
+
command = discover_acceptance_command() or ""
|
|
185
|
+
source = DISCOVERED
|
|
186
|
+
return cls(
|
|
187
|
+
command=command,
|
|
188
|
+
source=source,
|
|
189
|
+
retries=_env_int("ACLI_ACCEPTANCE_RETRIES", DEFAULT_RETRIES),
|
|
190
|
+
timeout=_env_int("ACLI_ACCEPTANCE_TIMEOUT", DEFAULT_TIMEOUT),
|
|
191
|
+
)
|
|
192
|
+
|
|
193
|
+
@property
|
|
194
|
+
def active(self) -> bool:
|
|
195
|
+
"""An empty command is the off switch."""
|
|
196
|
+
return bool(self.command)
|
|
197
|
+
|
|
198
|
+
def reset(self) -> None:
|
|
199
|
+
"""Drop the previous turn's anchor and retry budget.
|
|
200
|
+
|
|
201
|
+
The baseline has to come from the workspace as *this* turn found it,
|
|
202
|
+
and the retry budget is per-turn so one slow turn cannot spend the
|
|
203
|
+
next one's. An in-flight capture is cancelled for the same reason:
|
|
204
|
+
left running, it would write the previous turn's verdict into this
|
|
205
|
+
turn's ``baseline``.
|
|
206
|
+
"""
|
|
207
|
+
if self._baseline_task is not None and not self._baseline_task.done():
|
|
208
|
+
self._baseline_task.cancel()
|
|
209
|
+
self._baseline_task = None
|
|
210
|
+
self.baseline = None
|
|
211
|
+
self.attempts = 0
|
|
212
|
+
|
|
213
|
+
async def ensure_baseline(self) -> None:
|
|
214
|
+
"""Capture the pre-change verdict, once per turn.
|
|
215
|
+
|
|
216
|
+
Called before the first mutating tool call rather than at turn start:
|
|
217
|
+
a read-only or pure-answer turn never pays for a test suite, and the
|
|
218
|
+
baseline still comes from a workspace the agent has not touched.
|
|
219
|
+
|
|
220
|
+
Concurrent callers share one task rather than checking a flag. The
|
|
221
|
+
flag form lets the second mutating call in a parallel batch proceed
|
|
222
|
+
while the baseline is still running, so the "pre-change" verdict would
|
|
223
|
+
be captured against a workspace that had already changed.
|
|
224
|
+
"""
|
|
225
|
+
if not self.active:
|
|
226
|
+
return
|
|
227
|
+
if self._baseline_task is None:
|
|
228
|
+
self._baseline_task = asyncio.ensure_future(self._capture())
|
|
229
|
+
await self._baseline_task
|
|
230
|
+
|
|
231
|
+
async def _capture(self) -> None:
|
|
232
|
+
self.baseline = await self._run()
|
|
233
|
+
|
|
234
|
+
async def check(self) -> GateVerdict | None:
|
|
235
|
+
"""Run the check at the loop's exit and rule on the answer.
|
|
236
|
+
|
|
237
|
+
``None`` means "not applicable" — gate off, no command found, or
|
|
238
|
+
nothing was mutated this turn, in which case there is no work to
|
|
239
|
+
accept.
|
|
240
|
+
"""
|
|
241
|
+
if not self.active or self.baseline is None:
|
|
242
|
+
return None
|
|
243
|
+
run = await self._run()
|
|
244
|
+
self.attempts += 1
|
|
245
|
+
if run.ok:
|
|
246
|
+
return GateVerdict(run)
|
|
247
|
+
if _never_ran(run) and self._baseline_never_ran():
|
|
248
|
+
return GateVerdict(run, note=self._unrunnable_note(run))
|
|
249
|
+
if self._unchanged_since_baseline(run):
|
|
250
|
+
return GateVerdict(run, note=self._insensitive_note(run))
|
|
251
|
+
if self.attempts > self.retries:
|
|
252
|
+
return GateVerdict(run, note=self._unverified_note(run))
|
|
253
|
+
return GateVerdict(run, rejection=self._rejection(run))
|
|
254
|
+
|
|
255
|
+
def _baseline_never_ran(self) -> bool:
|
|
256
|
+
"""True when the pre-change check could not execute either.
|
|
257
|
+
|
|
258
|
+
This is what separates a broken environment from a broken change. The
|
|
259
|
+
baseline is captured before the agent touches anything, so a check that
|
|
260
|
+
already could not run then was not made unrunnable by the change.
|
|
261
|
+
Requiring it also keeps the sharp edge: a *green* baseline proves the
|
|
262
|
+
check does run here, so a collection error the agent introduced stays
|
|
263
|
+
on the rejection path instead of being excused.
|
|
264
|
+
"""
|
|
265
|
+
base = self.baseline
|
|
266
|
+
return bool(base and not base.ok and _never_ran(base))
|
|
267
|
+
|
|
268
|
+
def _unchanged_since_baseline(self, run: AcceptanceRun) -> bool:
|
|
269
|
+
"""True when the check came out byte-identical to a failing baseline.
|
|
270
|
+
|
|
271
|
+
The catch-all behind ``_baseline_never_ran``, for a check whose exit
|
|
272
|
+
statuses this module does not know — cargo, go, an immediate timeout —
|
|
273
|
+
where reproducing the baseline exactly is the only evidence available
|
|
274
|
+
that the break is environmental. Sending the model back to fix that
|
|
275
|
+
burns the turn on a problem it neither created nor can solve, so the
|
|
276
|
+
gate reports it instead of rejecting.
|
|
277
|
+
|
|
278
|
+
Byte-identical is the point: a suite that genuinely fails prints
|
|
279
|
+
timings, so real failures differ between runs and still get rejected.
|
|
280
|
+
Only a stable, environment-level break reproduces exactly.
|
|
281
|
+
"""
|
|
282
|
+
base = self.baseline
|
|
283
|
+
return bool(
|
|
284
|
+
base
|
|
285
|
+
and not base.ok
|
|
286
|
+
and base.exit_code == run.exit_code
|
|
287
|
+
and base.output == run.output,
|
|
288
|
+
)
|
|
289
|
+
|
|
290
|
+
async def _run(self) -> AcceptanceRun:
|
|
291
|
+
# run_command rather than a raw subprocess: it carries the
|
|
292
|
+
# blocked-pattern checks, the optional OS sandbox, the output caps, and
|
|
293
|
+
# the exit-code trailer that the rest of the loop already classifies.
|
|
294
|
+
from dashscope.acli.audit import get_audit_logger
|
|
295
|
+
from dashscope.acli.executor import classify_tool_text
|
|
296
|
+
from dashscope.acli.tools.shell import run_command
|
|
297
|
+
|
|
298
|
+
get_audit_logger().log_tool_call(
|
|
299
|
+
"acceptance_gate",
|
|
300
|
+
{"command": self.command},
|
|
301
|
+
decision="allowed",
|
|
302
|
+
reason=f"source: {self.source}",
|
|
303
|
+
)
|
|
304
|
+
text = await run_command(command=self.command, timeout=self.timeout)
|
|
305
|
+
outcome = classify_tool_text(text, {"command": self.command})
|
|
306
|
+
return AcceptanceRun(
|
|
307
|
+
command=self.command,
|
|
308
|
+
source=self.source,
|
|
309
|
+
ok=outcome.ok,
|
|
310
|
+
exit_code=outcome.exit_code,
|
|
311
|
+
output=outcome.text,
|
|
312
|
+
)
|
|
313
|
+
|
|
314
|
+
def _rejection(self, run: AcceptanceRun) -> str:
|
|
315
|
+
quoted = truncate_head_tail(run.output, _OUTPUT_CHARS, ratio=0.25)
|
|
316
|
+
fence = markdown_fence(quoted)
|
|
317
|
+
if self.baseline and self.baseline.ok:
|
|
318
|
+
verdict = (
|
|
319
|
+
"a REGRESSION: it passed before anything in this turn "
|
|
320
|
+
"changed, so the change broke it"
|
|
321
|
+
)
|
|
322
|
+
else:
|
|
323
|
+
verdict = "still failing"
|
|
324
|
+
return (
|
|
325
|
+
"\n## ⛔ Not accepted: the verification check is "
|
|
326
|
+
f"{verdict}\n"
|
|
327
|
+
f"`{run.command}` exited {run.exit_code}.\n"
|
|
328
|
+
f"{fence}\n{quoted}\n{fence}\n"
|
|
329
|
+
"Your answer is being withheld, not discarded: fix what this "
|
|
330
|
+
"output shows and the turn ends by itself. Work from the output "
|
|
331
|
+
"above — do not restate your plan, and do not declare the check "
|
|
332
|
+
"wrong unless this output says so.\n"
|
|
333
|
+
)
|
|
334
|
+
|
|
335
|
+
def _unverified_note(self, run: AcceptanceRun) -> str:
|
|
336
|
+
return (
|
|
337
|
+
f"\n[Unverified: `{run.command}` exited {run.exit_code} and the "
|
|
338
|
+
f"retry budget ({self.retries}) is spent, so the answer below is "
|
|
339
|
+
"reported as-is rather than withheld.]\n"
|
|
340
|
+
)
|
|
341
|
+
|
|
342
|
+
def _unrunnable_note(self, run: AcceptanceRun) -> str:
|
|
343
|
+
return (
|
|
344
|
+
f"\n[Unverified: `{run.command}` exited {run.exit_code} before "
|
|
345
|
+
"and after these changes, a status that means it never reached "
|
|
346
|
+
"the tests. The check does not run in this environment, so it "
|
|
347
|
+
"says nothing about the answer below.]\n"
|
|
348
|
+
)
|
|
349
|
+
|
|
350
|
+
def _insensitive_note(self, run: AcceptanceRun) -> str:
|
|
351
|
+
return (
|
|
352
|
+
f"\n[Unverified: `{run.command}` failed identically before and "
|
|
353
|
+
"after these changes, so it says nothing about them — most likely "
|
|
354
|
+
"the check itself does not run in this environment.]\n"
|
|
355
|
+
)
|