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.
Files changed (365) hide show
  1. {dashscope-1.27.5 → dashscope-1.27.7}/PKG-INFO +4 -3
  2. {dashscope-1.27.5 → dashscope-1.27.7}/README.md +2 -2
  3. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/__init__.py +1 -1
  4. dashscope-1.27.7/dashscope/acli/acceptance.py +355 -0
  5. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/agent.py +349 -78
  6. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/agents/delegate.py +14 -18
  7. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/agents/subagent.py +3 -3
  8. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/agents/subagents.py +31 -9
  9. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/__init__.py +10 -0
  10. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/dispatch.py +9 -1
  11. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/handlers_misc.py +41 -33
  12. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/runners.py +105 -3
  13. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/compression.py +54 -3
  14. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/config.py +9 -1
  15. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/agent.md +9 -4
  16. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/cli.md +15 -4
  17. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/system-prompt.md +10 -5
  18. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/executor.py +264 -14
  19. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/memory/manager.py +22 -3
  20. dashscope-1.27.7/dashscope/acli/memory/reflection.py +727 -0
  21. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/prompt_pipeline.py +11 -3
  22. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/providers/anthropic.py +22 -2
  23. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/providers/hardening.py +61 -7
  24. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/providers/tongyi.py +89 -10
  25. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/scheduler.py +3 -1
  26. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/skills/base.py +12 -7
  27. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/tools/filesystem.py +79 -17
  28. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/tools/shell.py +216 -58
  29. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/tools/skills.py +4 -1
  30. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/utils/messages.py +9 -2
  31. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/utils/paths.py +47 -8
  32. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/utils/text.py +38 -3
  33. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/resources/sessions.py +26 -2
  34. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/types/models.py +2 -0
  35. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/types/params.py +59 -10
  36. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/qwen_omni/omni_realtime.py +7 -10
  37. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/__init__.py +56 -21
  38. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/agentic_rl.py +11 -4
  39. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/deployments.py +2 -0
  40. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/agentic_rl.py +225 -2
  41. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/deployments.py +1 -1
  42. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/__init__.py +4 -0
  43. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/common/constants.py +8 -0
  44. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/common/model.py +236 -0
  45. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/common/model_types.py +1 -0
  46. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/common/utils.py +25 -7
  47. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/data/base_data_model.py +11 -0
  48. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/data/reward_output.py +13 -2
  49. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/data/rollout_output.py +13 -2
  50. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/version.py +1 -1
  51. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope.egg-info/PKG-INFO +4 -3
  52. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope.egg-info/SOURCES.txt +1 -0
  53. {dashscope-1.27.5 → dashscope-1.27.7}/setup.py +2 -1
  54. dashscope-1.27.5/dashscope/acli/memory/reflection.py +0 -337
  55. {dashscope-1.27.5 → dashscope-1.27.7}/LICENSE +0 -0
  56. {dashscope-1.27.5 → dashscope-1.27.7}/LICENSE.certifi +0 -0
  57. {dashscope-1.27.5 → dashscope-1.27.7}/MANIFEST.in +0 -0
  58. {dashscope-1.27.5 → dashscope-1.27.7}/NOTICE +0 -0
  59. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/__init__.py +0 -0
  60. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/__init__.pyi +0 -0
  61. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/__main__.py +0 -0
  62. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/agents/__init__.py +0 -0
  63. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/audit.py +0 -0
  64. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/capabilities/__init__.py +0 -0
  65. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/capabilities/local_memory.py +0 -0
  66. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/completer.py +0 -0
  67. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/constants.py +0 -0
  68. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/examples.py +0 -0
  69. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/handlers_capability.py +0 -0
  70. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/handlers_config.py +0 -0
  71. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/handlers_device.py +0 -0
  72. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/handlers_key.py +0 -0
  73. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/handlers_profile.py +0 -0
  74. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/handlers_provider.py +0 -0
  75. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/handlers_session.py +0 -0
  76. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/handlers_setup.py +0 -0
  77. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/handlers_skill.py +0 -0
  78. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/mcp.py +0 -0
  79. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/multimodal.py +0 -0
  80. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/repl.py +0 -0
  81. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/startup.py +0 -0
  82. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/cli/streaming.py +0 -0
  83. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/commands.py +0 -0
  84. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/debuglog.py +0 -0
  85. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/deliverable.py +0 -0
  86. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/dev.py +0 -0
  87. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/eval/__init__.py +0 -0
  88. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/basic-chat/.acli/config.toml +0 -0
  89. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/basic-chat/.acli/custom-extensions.toml +0 -0
  90. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/basic-chat/.acli/hooks.toml +0 -0
  91. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/basic-chat/.acli/skills/explain-code.md +0 -0
  92. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/basic-chat/.acli/skills/research-topic.md +0 -0
  93. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/basic-chat/.acli/skills/translate.md +0 -0
  94. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/basic-chat/.acli/skills/write-poem.md +0 -0
  95. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/basic-chat/.acli/system-prompt.md +0 -0
  96. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/basic-chat/README.md +0 -0
  97. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/config.toml +0 -0
  98. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/custom-extensions.toml +0 -0
  99. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/hooks.toml +0 -0
  100. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/api-doc.md +0 -0
  101. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/diagnose.md +0 -0
  102. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/error-code.md +0 -0
  103. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/explain-code.md +0 -0
  104. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/fine-tuning.md +0 -0
  105. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/multimodal.md +0 -0
  106. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/retrieval.md +0 -0
  107. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/sdk-example.md +0 -0
  108. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/speech.md +0 -0
  109. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/text-generation.md +0 -0
  110. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/translate.md +0 -0
  111. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/examples/dashscope-sdk-expert/README.md +0 -0
  112. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/extensions.py +0 -0
  113. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/hooks.py +0 -0
  114. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/mcp_server.py +0 -0
  115. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/mcp_stdio.py +0 -0
  116. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/memory/__init__.py +0 -0
  117. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/memory/directives_learning.py +0 -0
  118. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/memory/experience.py +0 -0
  119. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/memory/plan.py +0 -0
  120. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/memory/skill_evolution.py +0 -0
  121. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/memory/tool_chains.py +0 -0
  122. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/memory/trace.py +0 -0
  123. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/permission.py +0 -0
  124. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/platforms/__init__.py +0 -0
  125. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/platforms/bailian/__init__.py +0 -0
  126. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/platforms/bailian/cli.py +0 -0
  127. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/platforms/bailian/mcp.py +0 -0
  128. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/platforms/base.py +0 -0
  129. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/platforms/local/__init__.py +0 -0
  130. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/platforms/local/history.py +0 -0
  131. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/platforms/local/memory.py +0 -0
  132. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/prompt.py +0 -0
  133. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/providers/__init__.py +0 -0
  134. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/providers/adapter.py +0 -0
  135. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/providers/base.py +0 -0
  136. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/providers/openai.py +0 -0
  137. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/providers/profile.py +0 -0
  138. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/sandbox.py +0 -0
  139. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/sdk.py +0 -0
  140. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/session.py +0 -0
  141. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/session_events.py +0 -0
  142. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/skills/__init__.py +0 -0
  143. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/skills/manager.py +0 -0
  144. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/skills/package.py +0 -0
  145. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/skills/store.py +0 -0
  146. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/tools/__init__.py +0 -0
  147. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/tools/browser.py +0 -0
  148. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/tools/camera.py +0 -0
  149. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/tools/checkpoint.py +0 -0
  150. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/tools/evolution.py +0 -0
  151. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/tools/platform.py +0 -0
  152. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/tools/registry.py +0 -0
  153. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/tools/session.py +0 -0
  154. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/tools/vision.py +0 -0
  155. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/tools/web_search.py +0 -0
  156. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/ui/__init__.py +0 -0
  157. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/ui/camera.py +0 -0
  158. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/ui/embedded.py +0 -0
  159. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/ui/tts.py +0 -0
  160. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/ui/tui.py +0 -0
  161. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/ui/voice.py +0 -0
  162. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/utils/__init__.py +0 -0
  163. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/utils/clipboard.py +0 -0
  164. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/utils/crypto.py +0 -0
  165. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/utils/exceptions.py +0 -0
  166. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/utils/ids.py +0 -0
  167. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/utils/images.py +0 -0
  168. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/utils/keywords.py +0 -0
  169. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/utils/sanitizer.py +0 -0
  170. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/utils/spinner.py +0 -0
  171. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/utils/template.py +0 -0
  172. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/utils/toml.py +0 -0
  173. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/acli/utils/validation.py +0 -0
  174. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/__init__.py +0 -0
  175. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/client.py +0 -0
  176. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/constants.py +0 -0
  177. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/exceptions.py +0 -0
  178. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/pagination.py +0 -0
  179. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/resources/__init__.py +0 -0
  180. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/resources/_helpers.py +0 -0
  181. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/resources/agents.py +0 -0
  182. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/resources/deployments.py +0 -0
  183. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/resources/environments.py +0 -0
  184. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/resources/files.py +0 -0
  185. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/resources/security.py +0 -0
  186. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/resources/session_events.py +0 -0
  187. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/resources/session_resources.py +0 -0
  188. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/resources/session_threads.py +0 -0
  189. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/resources/skills.py +0 -0
  190. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/resources/vaults.py +0 -0
  191. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/resources/webhook_endpoints.py +0 -0
  192. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/streaming.py +0 -0
  193. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/transport.py +0 -0
  194. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/agentstudio/types/__init__.py +0 -0
  195. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/aigc/__init__.py +0 -0
  196. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/aigc/chat_completion.py +0 -0
  197. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/aigc/code_generation.py +0 -0
  198. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/aigc/conversation.py +0 -0
  199. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/aigc/generation.py +0 -0
  200. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/aigc/image_generation.py +0 -0
  201. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/aigc/image_synthesis.py +0 -0
  202. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/aigc/multimodal_conversation.py +0 -0
  203. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/aigc/video_synthesis.py +0 -0
  204. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/api_entities/__init__.py +0 -0
  205. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/api_entities/aio_session.py +0 -0
  206. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/api_entities/aiohttp_request.py +0 -0
  207. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/api_entities/api_request_data.py +0 -0
  208. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/api_entities/api_request_factory.py +0 -0
  209. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/api_entities/base_request.py +0 -0
  210. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/api_entities/chat_completion_types.py +0 -0
  211. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/api_entities/dashscope_response.py +0 -0
  212. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/api_entities/encryption.py +0 -0
  213. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/api_entities/http_request.py +0 -0
  214. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/api_entities/websocket_request.py +0 -0
  215. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/app/__init__.py +0 -0
  216. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/app/application.py +0 -0
  217. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/app/application_response.py +0 -0
  218. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/assistants/__init__.py +0 -0
  219. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/assistants/assistant_types.py +0 -0
  220. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/assistants/assistants.py +0 -0
  221. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/assistants/files.py +0 -0
  222. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/__init__.py +0 -0
  223. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/asr/__init__.py +0 -0
  224. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/asr/asr_phrase_manager.py +0 -0
  225. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/asr/recognition.py +0 -0
  226. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/asr/transcription.py +0 -0
  227. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/asr/translation_recognizer.py +0 -0
  228. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/asr/vocabulary.py +0 -0
  229. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/http_tts/__init__.py +0 -0
  230. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/http_tts/http_speech_synthesizer.py +0 -0
  231. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/qwen_asr/__init__.py +0 -0
  232. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/qwen_asr/qwen_transcription.py +0 -0
  233. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/qwen_omni/__init__.py +0 -0
  234. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/qwen_tts/__init__.py +0 -0
  235. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/qwen_tts/speech_synthesizer.py +0 -0
  236. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/qwen_tts_realtime/__init__.py +0 -0
  237. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/qwen_tts_realtime/qwen_tts_realtime.py +0 -0
  238. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/tts/__init__.py +0 -0
  239. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/tts/speech_synthesizer.py +0 -0
  240. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/tts_v2/__init__.py +0 -0
  241. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/tts_v2/enrollment.py +0 -0
  242. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/audio/tts_v2/speech_synthesizer.py +0 -0
  243. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/__main__.py +0 -0
  244. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/application.py +0 -0
  245. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/auth.py +0 -0
  246. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/code_generation.py +0 -0
  247. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/common.py +0 -0
  248. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/embeddings.py +0 -0
  249. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/files.py +0 -0
  250. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/fine_tunes.py +0 -0
  251. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/generation.py +0 -0
  252. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/image_generation.py +0 -0
  253. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/image_synthesis.py +0 -0
  254. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/models.py +0 -0
  255. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/multimodal_conversation.py +0 -0
  256. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/multimodal_embedding.py +0 -0
  257. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/oss.py +0 -0
  258. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/rerank.py +0 -0
  259. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/speech_synthesis.py +0 -0
  260. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/tokenization.py +0 -0
  261. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/transcription.py +0 -0
  262. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/understanding.py +0 -0
  263. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/cli/video_synthesis.py +0 -0
  264. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/client/__init__.py +0 -0
  265. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/client/base_api.py +0 -0
  266. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/common/__init__.py +0 -0
  267. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/common/api_key.py +0 -0
  268. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/common/base_type.py +0 -0
  269. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/common/constants.py +0 -0
  270. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/common/env.py +0 -0
  271. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/common/error.py +0 -0
  272. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/common/logging.py +0 -0
  273. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/common/message_manager.py +0 -0
  274. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/common/utils.py +0 -0
  275. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/embeddings/__init__.py +0 -0
  276. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/embeddings/batch_text_embedding.py +0 -0
  277. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/embeddings/batch_text_embedding_response.py +0 -0
  278. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/embeddings/multimodal_embedding.py +0 -0
  279. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/embeddings/text_embedding.py +0 -0
  280. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/files.py +0 -0
  281. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/__init__.py +0 -0
  282. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/customize_types.py +0 -0
  283. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/finetunes.py +0 -0
  284. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/common/__init__.py +0 -0
  285. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/common/errors.py +0 -0
  286. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/common/log.py +0 -0
  287. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/__init__.py +0 -0
  288. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/data/__init__.py +0 -0
  289. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/data/group_reward_input.py +0 -0
  290. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/data/group_reward_output.py +0 -0
  291. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/data/reward_input.py +0 -0
  292. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/data/rollout_input.py +0 -0
  293. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/demo/__init__.py +0 -0
  294. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/demo/group_reward_processor_demo.py +0 -0
  295. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/demo/reward_processor_demo.py +0 -0
  296. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/demo/rollout_processor_demo.py +0 -0
  297. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/func_decorator.py +0 -0
  298. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/func_manager.py +0 -0
  299. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/observability/__init__.py +0 -0
  300. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/observability/genai/__init__.py +0 -0
  301. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/observability/genai/_core.py +0 -0
  302. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/observability/genai/llm_dashscope.py +0 -0
  303. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/observability/genai/llm_openai.py +0 -0
  304. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/observability/genai/llm_span.py +0 -0
  305. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/observability/genai/messages.py +0 -0
  306. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/observability/genai/tools.py +0 -0
  307. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/observability/processor_span.py +0 -0
  308. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/observability/tracing.py +0 -0
  309. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/parser/__init__.py +0 -0
  310. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/parser/base_parser.py +0 -0
  311. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/parser/group_reward_parser.py +0 -0
  312. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/parser/reward_parser.py +0 -0
  313. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/parser/rollout_parser.py +0 -0
  314. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/processor/__init__.py +0 -0
  315. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/processor/abstract_group_reward_processor.py +0 -0
  316. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/processor/abstract_processor.py +0 -0
  317. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/processor/abstract_reward_processor.py +0 -0
  318. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/processor/abstract_rollout_processor.py +0 -0
  319. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/server/__init__.py +0 -0
  320. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/finetune/reinforcement/component/server/server.py +0 -0
  321. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/io/__init__.py +0 -0
  322. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/io/input_output.py +0 -0
  323. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/model.py +0 -0
  324. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/models.py +0 -0
  325. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/multimodal/__init__.py +0 -0
  326. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/multimodal/dialog_state.py +0 -0
  327. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/multimodal/multimodal_constants.py +0 -0
  328. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/multimodal/multimodal_dialog.py +0 -0
  329. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/multimodal/multimodal_request_params.py +0 -0
  330. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/multimodal/tingwu/__init__.py +0 -0
  331. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/multimodal/tingwu/tingwu.py +0 -0
  332. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/multimodal/tingwu/tingwu_realtime.py +0 -0
  333. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/nlp/__init__.py +0 -0
  334. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/nlp/understanding.py +0 -0
  335. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/protocol/__init__.py +0 -0
  336. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/protocol/websocket.py +0 -0
  337. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/py.typed +0 -0
  338. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/rerank/__init__.py +0 -0
  339. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/rerank/text_rerank.py +0 -0
  340. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/resources/qwen.tiktoken +0 -0
  341. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/threads/__init__.py +0 -0
  342. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/threads/messages/__init__.py +0 -0
  343. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/threads/messages/files.py +0 -0
  344. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/threads/messages/messages.py +0 -0
  345. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/threads/runs/__init__.py +0 -0
  346. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/threads/runs/runs.py +0 -0
  347. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/threads/runs/steps.py +0 -0
  348. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/threads/thread_types.py +0 -0
  349. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/threads/threads.py +0 -0
  350. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/tokenizers/__init__.py +0 -0
  351. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/tokenizers/qwen_tokenizer.py +0 -0
  352. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/tokenizers/tokenization.py +0 -0
  353. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/tokenizers/tokenizer.py +0 -0
  354. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/tokenizers/tokenizer_base.py +0 -0
  355. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/utils/__init__.py +0 -0
  356. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/utils/message_utils.py +0 -0
  357. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/utils/oss_utils.py +0 -0
  358. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope/utils/param_utils.py +0 -0
  359. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope.egg-info/dependency_links.txt +0 -0
  360. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope.egg-info/entry_points.txt +0 -0
  361. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope.egg-info/not-zip-safe +0 -0
  362. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope.egg-info/requires.txt +0 -0
  363. {dashscope-1.27.5 → dashscope-1.27.7}/dashscope.egg-info/top_level.txt +0 -0
  364. {dashscope-1.27.5 → dashscope-1.27.7}/requirements.txt +0 -0
  365. {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.5
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, e.g. `dashscope "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
+ **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"`. Type `/help` inside the assistant to list available commands (`/setup`, `/skill`, `/stats`, ...); classic SDK subcommands still work, and unrecognized commands are routed to the assistant
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, e.g. `dashscope "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.
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"`. Type `/help` inside the assistant to list available commands (`/setup`, `/skill`, `/stats`, ...); classic SDK subcommands still work, and unrecognized commands are routed to the assistant
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
@@ -3,7 +3,7 @@ from __future__ import annotations
3
3
 
4
4
  import uuid
5
5
 
6
- __version__ = "0.6.5"
6
+ __version__ = "0.6.7"
7
7
 
8
8
  # Per-process identifier sent as x-dashscope-sdk-session-id so the
9
9
  # backend can group multi-turn requests from one CLI run.
@@ -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
+ )