dashscope 2.0.3__tar.gz → 2.0.4__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 (622) hide show
  1. {dashscope-2.0.3 → dashscope-2.0.4}/PKG-INFO +27 -2
  2. {dashscope-2.0.3 → dashscope-2.0.4}/README.md +26 -1
  3. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/__init__.py +0 -1
  4. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/_shared/_sdk_ident.py +1 -1
  5. dashscope-2.0.4/dashscope/acli/expert.py +143 -0
  6. dashscope-2.0.4/dashscope/cli/__init__.py +13 -0
  7. dashscope-2.0.4/dashscope/cli/__main__.py +8 -0
  8. dashscope-2.0.4/dashscope/cli/app.py +213 -0
  9. dashscope-2.0.4/dashscope/cli/commands/__init__.py +15 -0
  10. dashscope-2.0.4/dashscope/cli/commands/agentstudio.py +646 -0
  11. dashscope-2.0.4/dashscope/cli/commands/apps.py +226 -0
  12. dashscope-2.0.4/dashscope/cli/commands/audio.py +718 -0
  13. dashscope-2.0.4/dashscope/cli/commands/audio_customization.py +567 -0
  14. dashscope-2.0.4/dashscope/cli/commands/auth.py +127 -0
  15. dashscope-2.0.4/dashscope/cli/commands/chat.py +158 -0
  16. dashscope-2.0.4/dashscope/cli/commands/config.py +84 -0
  17. dashscope-2.0.4/dashscope/cli/commands/decision.py +141 -0
  18. dashscope-2.0.4/dashscope/cli/commands/deployments.py +283 -0
  19. dashscope-2.0.4/dashscope/cli/commands/embeddings.py +303 -0
  20. dashscope-2.0.4/dashscope/cli/commands/files.py +123 -0
  21. dashscope-2.0.4/dashscope/cli/commands/ft.py +306 -0
  22. dashscope-2.0.4/dashscope/cli/commands/images.py +379 -0
  23. dashscope-2.0.4/dashscope/cli/commands/models.py +78 -0
  24. dashscope-2.0.4/dashscope/cli/commands/multimodal.py +321 -0
  25. dashscope-2.0.4/dashscope/cli/commands/oss.py +55 -0
  26. dashscope-2.0.4/dashscope/cli/commands/rerank.py +139 -0
  27. dashscope-2.0.4/dashscope/cli/commands/rl.py +462 -0
  28. dashscope-2.0.4/dashscope/cli/commands/tingwu.py +109 -0
  29. dashscope-2.0.4/dashscope/cli/commands/tokenization.py +91 -0
  30. dashscope-2.0.4/dashscope/cli/commands/videos.py +405 -0
  31. dashscope-2.0.4/dashscope/cli/config_store.py +601 -0
  32. dashscope-2.0.4/dashscope/cli/confirm.py +47 -0
  33. dashscope-2.0.4/dashscope/cli/context.py +224 -0
  34. dashscope-2.0.4/dashscope/cli/errors.py +520 -0
  35. dashscope-2.0.4/dashscope/cli/input.py +256 -0
  36. dashscope-2.0.4/dashscope/cli/main.py +336 -0
  37. dashscope-2.0.4/dashscope/cli/output.py +336 -0
  38. dashscope-2.0.4/dashscope/cli/progress.py +134 -0
  39. dashscope-2.0.4/dashscope/cli/sdk.py +78 -0
  40. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/client.py +40 -4
  41. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/_shim.py +0 -1
  42. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/cli/__init__.py +20 -142
  43. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/_oss_upload.py +6 -2
  44. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/audio/asr.py +7 -2
  45. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/audio/realtime.py +13 -1
  46. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/audio/tts.py +6 -2
  47. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/chat/completions.py +22 -2
  48. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/tingwu.py +6 -1
  49. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/transport/http.py +24 -2
  50. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/transport/ws.py +20 -0
  51. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/version.py +1 -1
  52. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope.egg-info/PKG-INFO +27 -2
  53. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope.egg-info/SOURCES.txt +38 -0
  54. dashscope-2.0.4/dashscope.egg-info/entry_points.txt +3 -0
  55. {dashscope-2.0.3 → dashscope-2.0.4}/examples/03_agent_recipes/mcp_server_demo/README.md +3 -3
  56. {dashscope-2.0.3 → dashscope-2.0.4}/examples/03_agent_recipes/mcp_server_demo/client_demo.py +1 -1
  57. {dashscope-2.0.3 → dashscope-2.0.4}/examples/04_real_world_scenarios/README.md +7 -7
  58. {dashscope-2.0.3 → dashscope-2.0.4}/examples/04_real_world_scenarios/README_zh.md +7 -7
  59. dashscope-2.0.4/examples/05_cli/cli_ci_harness.py +777 -0
  60. dashscope-2.0.4/examples/05_cli/cli_output_and_errors.py +607 -0
  61. dashscope-2.0.4/examples/README.md +666 -0
  62. dashscope-2.0.4/examples/README_zh.md +666 -0
  63. {dashscope-2.0.3 → dashscope-2.0.4}/setup.py +4 -1
  64. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_chat.py +24 -0
  65. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_legacy_import_aliases.py +2 -2
  66. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_oss_upload.py +30 -2
  67. dashscope-2.0.4/tests/test_user_agent_suffix.py +358 -0
  68. dashscope-2.0.3/dashscope.egg-info/entry_points.txt +0 -2
  69. dashscope-2.0.3/examples/README.md +0 -159
  70. dashscope-2.0.3/examples/README_zh.md +0 -159
  71. {dashscope-2.0.3 → dashscope-2.0.4}/LICENSE +0 -0
  72. {dashscope-2.0.3 → dashscope-2.0.4}/LICENSE.certifi +0 -0
  73. {dashscope-2.0.3 → dashscope-2.0.4}/MANIFEST.in +0 -0
  74. {dashscope-2.0.3 → dashscope-2.0.4}/NOTICE +0 -0
  75. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/__init__.pyi +0 -0
  76. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/_config.py +0 -0
  77. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/_error_registry.py +0 -0
  78. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/_logging.py +0 -0
  79. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/_quickstart.py +0 -0
  80. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/_shared/__init__.py +0 -0
  81. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/_shared/_errors.py +0 -0
  82. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/_shared/_sdk_session.py +0 -0
  83. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/_shared/_validation.py +0 -0
  84. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/__init__.py +0 -0
  85. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/__main__.py +0 -0
  86. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/acceptance.py +0 -0
  87. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/agent.py +0 -0
  88. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/agents/__init__.py +0 -0
  89. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/agents/delegate.py +0 -0
  90. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/agents/subagent.py +0 -0
  91. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/agents/subagents.py +0 -0
  92. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/audit.py +0 -0
  93. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/capabilities/__init__.py +0 -0
  94. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/capabilities/local_memory.py +0 -0
  95. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/cli/__init__.py +0 -0
  96. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/cli/completer.py +0 -0
  97. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/cli/constants.py +0 -0
  98. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/cli/dispatch.py +0 -0
  99. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/cli/examples.py +0 -0
  100. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/cli/handlers_capability.py +0 -0
  101. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/cli/handlers_config.py +0 -0
  102. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/cli/handlers_device.py +0 -0
  103. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/cli/handlers_key.py +0 -0
  104. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/cli/handlers_misc.py +0 -0
  105. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/cli/handlers_profile.py +0 -0
  106. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/cli/handlers_provider.py +0 -0
  107. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/cli/handlers_session.py +0 -0
  108. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/cli/handlers_setup.py +0 -0
  109. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/cli/handlers_skill.py +0 -0
  110. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/cli/mcp.py +0 -0
  111. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/cli/multimodal.py +0 -0
  112. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/cli/repl.py +0 -0
  113. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/cli/runners.py +0 -0
  114. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/cli/startup.py +0 -0
  115. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/cli/streaming.py +0 -0
  116. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/commands.py +0 -0
  117. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/compression.py +0 -0
  118. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/config.py +0 -0
  119. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/debuglog.py +0 -0
  120. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/deliverable.py +0 -0
  121. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/dev.py +0 -0
  122. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/eval/__init__.py +0 -0
  123. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/examples/basic-chat/.acli/config.toml +0 -0
  124. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/examples/basic-chat/.acli/custom-extensions.toml +0 -0
  125. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/examples/basic-chat/.acli/hooks.toml +0 -0
  126. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/examples/basic-chat/.acli/skills/explain-code.md +0 -0
  127. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/examples/basic-chat/.acli/skills/research-topic.md +0 -0
  128. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/examples/basic-chat/.acli/skills/translate.md +0 -0
  129. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/examples/basic-chat/.acli/skills/write-poem.md +0 -0
  130. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/examples/basic-chat/.acli/system-prompt.md +0 -0
  131. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/examples/basic-chat/README.md +0 -0
  132. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/examples/dashscope-sdk-expert/.acli/config.toml +0 -0
  133. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/examples/dashscope-sdk-expert/.acli/custom-extensions.toml +0 -0
  134. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/examples/dashscope-sdk-expert/.acli/hooks.toml +0 -0
  135. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/agent.md +0 -0
  136. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/api-doc.md +0 -0
  137. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/cli.md +0 -0
  138. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/diagnose.md +0 -0
  139. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/error-code.md +0 -0
  140. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/explain-code.md +0 -0
  141. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/fine-tuning.md +0 -0
  142. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/multimodal.md +0 -0
  143. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/retrieval.md +0 -0
  144. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/sdk-example.md +0 -0
  145. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/speech.md +0 -0
  146. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/text-generation.md +0 -0
  147. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/translate.md +0 -0
  148. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/examples/dashscope-sdk-expert/.acli/system-prompt.md +0 -0
  149. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/examples/dashscope-sdk-expert/README.md +0 -0
  150. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/executor.py +0 -0
  151. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/extensions.py +0 -0
  152. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/hooks.py +0 -0
  153. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/mcp_server.py +0 -0
  154. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/mcp_stdio.py +0 -0
  155. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/memory/__init__.py +0 -0
  156. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/memory/directives_learning.py +0 -0
  157. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/memory/experience.py +0 -0
  158. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/memory/manager.py +0 -0
  159. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/memory/plan.py +0 -0
  160. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/memory/reflection.py +0 -0
  161. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/memory/skill_evolution.py +0 -0
  162. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/memory/tool_chains.py +0 -0
  163. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/memory/trace.py +0 -0
  164. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/permission.py +0 -0
  165. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/platforms/__init__.py +0 -0
  166. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/platforms/bailian/__init__.py +0 -0
  167. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/platforms/bailian/cli.py +0 -0
  168. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/platforms/bailian/mcp.py +0 -0
  169. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/platforms/base.py +0 -0
  170. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/platforms/local/__init__.py +0 -0
  171. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/platforms/local/history.py +0 -0
  172. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/platforms/local/memory.py +0 -0
  173. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/prompt.py +0 -0
  174. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/prompt_pipeline.py +0 -0
  175. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/providers/__init__.py +0 -0
  176. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/providers/adapter.py +0 -0
  177. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/providers/anthropic.py +0 -0
  178. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/providers/base.py +0 -0
  179. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/providers/hardening.py +0 -0
  180. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/providers/openai.py +0 -0
  181. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/providers/profile.py +0 -0
  182. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/providers/tongyi.py +0 -0
  183. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/runtime.py +0 -0
  184. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/sandbox.py +0 -0
  185. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/scheduler.py +0 -0
  186. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/sdk.py +0 -0
  187. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/session.py +0 -0
  188. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/session_events.py +0 -0
  189. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/skills/__init__.py +0 -0
  190. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/skills/base.py +0 -0
  191. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/skills/manager.py +0 -0
  192. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/skills/package.py +0 -0
  193. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/skills/store.py +0 -0
  194. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/tools/__init__.py +0 -0
  195. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/tools/browser.py +0 -0
  196. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/tools/camera.py +0 -0
  197. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/tools/checkpoint.py +0 -0
  198. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/tools/evolution.py +0 -0
  199. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/tools/filesystem.py +0 -0
  200. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/tools/platform.py +0 -0
  201. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/tools/registry.py +0 -0
  202. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/tools/session.py +0 -0
  203. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/tools/shell.py +0 -0
  204. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/tools/skills.py +0 -0
  205. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/tools/vision.py +0 -0
  206. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/tools/web_search.py +0 -0
  207. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/ui/__init__.py +0 -0
  208. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/ui/camera.py +0 -0
  209. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/ui/embedded.py +0 -0
  210. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/ui/tts.py +0 -0
  211. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/ui/tui.py +0 -0
  212. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/ui/voice.py +0 -0
  213. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/utils/__init__.py +0 -0
  214. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/utils/clipboard.py +0 -0
  215. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/utils/crypto.py +0 -0
  216. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/utils/exceptions.py +0 -0
  217. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/utils/ids.py +0 -0
  218. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/utils/images.py +0 -0
  219. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/utils/keywords.py +0 -0
  220. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/utils/messages.py +0 -0
  221. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/utils/paths.py +0 -0
  222. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/utils/sanitizer.py +0 -0
  223. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/utils/spinner.py +0 -0
  224. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/utils/template.py +0 -0
  225. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/utils/text.py +0 -0
  226. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/utils/toml.py +0 -0
  227. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/acli/utils/validation.py +0 -0
  228. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/__init__.py +0 -0
  229. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/agentstudio/__init__.py +0 -0
  230. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/agentstudio/client.py +0 -0
  231. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/agentstudio/constants.py +0 -0
  232. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/agentstudio/exceptions.py +0 -0
  233. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/agentstudio/pagination.py +0 -0
  234. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/agentstudio/resources/__init__.py +0 -0
  235. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/agentstudio/resources/_helpers.py +0 -0
  236. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/agentstudio/resources/agents.py +0 -0
  237. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/agentstudio/resources/deployments.py +0 -0
  238. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/agentstudio/resources/environments.py +0 -0
  239. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/agentstudio/resources/files.py +0 -0
  240. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/agentstudio/resources/memory_stores.py +0 -0
  241. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/agentstudio/resources/security.py +0 -0
  242. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/agentstudio/resources/session_events.py +0 -0
  243. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/agentstudio/resources/session_resources.py +0 -0
  244. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/agentstudio/resources/session_threads.py +0 -0
  245. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/agentstudio/resources/sessions.py +0 -0
  246. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/agentstudio/resources/skills.py +0 -0
  247. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/agentstudio/resources/vaults.py +0 -0
  248. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/agentstudio/resources/webhook_endpoints.py +0 -0
  249. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/agentstudio/streaming.py +0 -0
  250. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/agentstudio/transport.py +0 -0
  251. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/agentstudio/types/__init__.py +0 -0
  252. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/agentstudio/types/models.py +0 -0
  253. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/agentstudio/types/params.py +0 -0
  254. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/__init__.py +0 -0
  255. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/_submit.py +0 -0
  256. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/agentic_rl.py +0 -0
  257. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/__init__.py +0 -0
  258. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/common/__init__.py +0 -0
  259. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/common/_legacy_errors.py +0 -0
  260. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/common/constants.py +0 -0
  261. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/common/errors.py +0 -0
  262. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/common/log.py +0 -0
  263. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/common/model.py +0 -0
  264. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/common/model_types.py +0 -0
  265. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/common/utils.py +0 -0
  266. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/__init__.py +0 -0
  267. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/data/__init__.py +0 -0
  268. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/data/base_data_model.py +0 -0
  269. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/data/group_reward_input.py +0 -0
  270. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/data/group_reward_output.py +0 -0
  271. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/data/reward_input.py +0 -0
  272. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/data/reward_output.py +0 -0
  273. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/data/rollout_input.py +0 -0
  274. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/data/rollout_output.py +0 -0
  275. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/demo/__init__.py +0 -0
  276. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/demo/group_reward_processor_demo.py +0 -0
  277. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/demo/reward_processor_demo.py +0 -0
  278. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/demo/rollout_processor_demo.py +0 -0
  279. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/func_decorator.py +0 -0
  280. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/func_manager.py +0 -0
  281. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/observability/__init__.py +0 -0
  282. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/observability/genai/__init__.py +0 -0
  283. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/observability/genai/_core.py +0 -0
  284. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/observability/genai/llm_dashscope.py +0 -0
  285. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/observability/genai/llm_openai.py +0 -0
  286. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/observability/genai/llm_span.py +0 -0
  287. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/observability/genai/messages.py +0 -0
  288. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/observability/genai/tools.py +0 -0
  289. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/observability/processor_span.py +0 -0
  290. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/observability/tracing.py +0 -0
  291. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/parser/__init__.py +0 -0
  292. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/parser/base_parser.py +0 -0
  293. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/parser/group_reward_parser.py +0 -0
  294. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/parser/reward_parser.py +0 -0
  295. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/parser/rollout_parser.py +0 -0
  296. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/processor/__init__.py +0 -0
  297. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/processor/abstract_group_reward_processor.py +0 -0
  298. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/processor/abstract_processor.py +0 -0
  299. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/processor/abstract_reward_processor.py +0 -0
  300. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/processor/abstract_rollout_processor.py +0 -0
  301. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/server/__init__.py +0 -0
  302. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/applications/finetune/reinforcement/component/server/server.py +0 -0
  303. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/errors.py +0 -0
  304. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/__init__.py +0 -0
  305. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/agentstudio/__init__.py +0 -0
  306. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/agentstudio/client.py +0 -0
  307. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/agentstudio/exceptions.py +0 -0
  308. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/agentstudio/streaming.py +0 -0
  309. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/agentstudio/transport.py +0 -0
  310. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/aigc/__init__.py +0 -0
  311. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/aigc/chat_completion.py +0 -0
  312. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/aigc/code_generation.py +0 -0
  313. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/aigc/conversation.py +0 -0
  314. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/aigc/generation.py +0 -0
  315. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/aigc/image_generation.py +0 -0
  316. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/aigc/image_synthesis.py +0 -0
  317. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/aigc/multimodal_conversation.py +0 -0
  318. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/aigc/video_synthesis.py +0 -0
  319. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/api_entities/__init__.py +0 -0
  320. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/api_entities/aio_session.py +0 -0
  321. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/api_entities/aiohttp_request.py +0 -0
  322. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/api_entities/api_request_data.py +0 -0
  323. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/api_entities/api_request_factory.py +0 -0
  324. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/api_entities/base_request.py +0 -0
  325. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/api_entities/chat_completion_types.py +0 -0
  326. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/api_entities/dashscope_response.py +0 -0
  327. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/api_entities/encryption.py +0 -0
  328. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/api_entities/http_request.py +0 -0
  329. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/api_entities/websocket_request.py +0 -0
  330. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/app/__init__.py +0 -0
  331. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/app/application.py +0 -0
  332. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/app/application_response.py +0 -0
  333. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/assistants/__init__.py +0 -0
  334. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/assistants/assistant_types.py +0 -0
  335. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/assistants/assistants.py +0 -0
  336. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/assistants/files.py +0 -0
  337. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/audio/__init__.py +0 -0
  338. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/audio/asr/__init__.py +0 -0
  339. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/audio/asr/asr_phrase_manager.py +0 -0
  340. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/audio/asr/recognition.py +0 -0
  341. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/audio/asr/transcription.py +0 -0
  342. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/audio/asr/translation_recognizer.py +0 -0
  343. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/audio/asr/vocabulary.py +0 -0
  344. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/audio/http_tts/__init__.py +0 -0
  345. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/audio/http_tts/http_speech_synthesizer.py +0 -0
  346. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/audio/qwen_asr/__init__.py +0 -0
  347. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/audio/qwen_asr/qwen_transcription.py +0 -0
  348. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/audio/qwen_omni/__init__.py +0 -0
  349. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/audio/qwen_omni/omni_realtime.py +0 -0
  350. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/audio/qwen_tts/__init__.py +0 -0
  351. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/audio/qwen_tts/speech_synthesizer.py +0 -0
  352. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/audio/qwen_tts_realtime/__init__.py +0 -0
  353. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/audio/qwen_tts_realtime/qwen_tts_realtime.py +0 -0
  354. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/audio/tts/__init__.py +0 -0
  355. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/audio/tts/speech_synthesizer.py +0 -0
  356. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/audio/tts_v2/__init__.py +0 -0
  357. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/audio/tts_v2/enrollment.py +0 -0
  358. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/audio/tts_v2/speech_synthesizer.py +0 -0
  359. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/cli/__main__.py +0 -0
  360. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/cli/agentic_rl.py +0 -0
  361. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/cli/application.py +0 -0
  362. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/cli/auth.py +0 -0
  363. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/cli/code_generation.py +0 -0
  364. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/cli/common.py +0 -0
  365. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/cli/deployments.py +0 -0
  366. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/cli/embeddings.py +0 -0
  367. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/cli/files.py +0 -0
  368. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/cli/fine_tunes.py +0 -0
  369. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/cli/generation.py +0 -0
  370. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/cli/image_generation.py +0 -0
  371. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/cli/image_synthesis.py +0 -0
  372. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/cli/models.py +0 -0
  373. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/cli/multimodal_conversation.py +0 -0
  374. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/cli/multimodal_embedding.py +0 -0
  375. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/cli/oss.py +0 -0
  376. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/cli/rerank.py +0 -0
  377. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/cli/speech_synthesis.py +0 -0
  378. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/cli/tokenization.py +0 -0
  379. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/cli/transcription.py +0 -0
  380. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/cli/understanding.py +0 -0
  381. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/cli/video_synthesis.py +0 -0
  382. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/client/__init__.py +0 -0
  383. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/client/base_api.py +0 -0
  384. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/common/__init__.py +0 -0
  385. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/common/_sdk_session.py +0 -0
  386. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/common/api_key.py +0 -0
  387. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/common/base_type.py +0 -0
  388. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/common/constants.py +0 -0
  389. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/common/env.py +0 -0
  390. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/common/error.py +0 -0
  391. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/common/logging.py +0 -0
  392. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/common/message_manager.py +0 -0
  393. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/common/utils.py +0 -0
  394. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/embeddings/__init__.py +0 -0
  395. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/embeddings/batch_text_embedding.py +0 -0
  396. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/embeddings/batch_text_embedding_response.py +0 -0
  397. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/embeddings/multimodal_embedding.py +0 -0
  398. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/embeddings/text_embedding.py +0 -0
  399. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/files.py +0 -0
  400. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/finetune/__init__.py +0 -0
  401. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/finetune/agentic_rl.py +0 -0
  402. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/finetune/customize_types.py +0 -0
  403. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/finetune/deployments.py +0 -0
  404. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/finetune/finetunes.py +0 -0
  405. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/finetune/reinforcement/__init__.py +0 -0
  406. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/finetune/reinforcement/common/__init__.py +0 -0
  407. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/finetune/reinforcement/common/errors.py +0 -0
  408. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/io/__init__.py +0 -0
  409. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/io/input_output.py +0 -0
  410. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/model.py +0 -0
  411. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/models.py +0 -0
  412. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/multimodal/__init__.py +0 -0
  413. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/multimodal/dialog_state.py +0 -0
  414. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/multimodal/multimodal_constants.py +0 -0
  415. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/multimodal/multimodal_dialog.py +0 -0
  416. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/multimodal/multimodal_request_params.py +0 -0
  417. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/multimodal/tingwu/__init__.py +0 -0
  418. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/multimodal/tingwu/tingwu.py +0 -0
  419. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/multimodal/tingwu/tingwu_realtime.py +0 -0
  420. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/nlp/__init__.py +0 -0
  421. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/nlp/understanding.py +0 -0
  422. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/protocol/__init__.py +0 -0
  423. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/protocol/websocket.py +0 -0
  424. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/rerank/__init__.py +0 -0
  425. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/rerank/text_rerank.py +0 -0
  426. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/threads/__init__.py +0 -0
  427. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/threads/messages/__init__.py +0 -0
  428. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/threads/messages/files.py +0 -0
  429. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/threads/messages/messages.py +0 -0
  430. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/threads/runs/__init__.py +0 -0
  431. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/threads/runs/runs.py +0 -0
  432. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/threads/runs/steps.py +0 -0
  433. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/threads/thread_types.py +0 -0
  434. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/threads/threads.py +0 -0
  435. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/tokenizers/__init__.py +0 -0
  436. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/tokenizers/qwen.tiktoken +0 -0
  437. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/tokenizers/qwen_tokenizer.py +0 -0
  438. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/tokenizers/tokenization.py +0 -0
  439. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/tokenizers/tokenizer.py +0 -0
  440. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/tokenizers/tokenizer_base.py +0 -0
  441. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/utils/__init__.py +0 -0
  442. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/utils/message_utils.py +0 -0
  443. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/utils/oss_utils.py +0 -0
  444. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/legacy_1x/utils/param_utils.py +0 -0
  445. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/protocols/__init__.py +0 -0
  446. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/protocols/anthropic.py +0 -0
  447. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/protocols/base.py +0 -0
  448. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/protocols/native.py +0 -0
  449. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/protocols/openai.py +0 -0
  450. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/py.typed +0 -0
  451. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/__init__.py +0 -0
  452. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/_blocking.py +0 -0
  453. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/_jobs.py +0 -0
  454. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/_oss.py +0 -0
  455. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/_sse.py +0 -0
  456. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/apps.py +0 -0
  457. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/audio/__init__.py +0 -0
  458. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/audio/_callbacks.py +0 -0
  459. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/audio/customization.py +0 -0
  460. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/audio/http_tts.py +0 -0
  461. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/audio/phrases.py +0 -0
  462. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/chat/__init__.py +0 -0
  463. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/chat/_params.py +0 -0
  464. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/decision.py +0 -0
  465. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/deployments.py +0 -0
  466. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/embeddings.py +0 -0
  467. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/files.py +0 -0
  468. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/fine_tunes.py +0 -0
  469. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/images.py +0 -0
  470. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/models.py +0 -0
  471. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/multimodal/__init__.py +0 -0
  472. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/multimodal/chat.py +0 -0
  473. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/multimodal/embeddings.py +0 -0
  474. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/reinforcement_learning.py +0 -0
  475. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/rerank.py +0 -0
  476. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/tokenization.py +0 -0
  477. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/resources/videos.py +0 -0
  478. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/transport/__init__.py +0 -0
  479. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/transport/_ident.py +0 -0
  480. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/transport/_retry.py +0 -0
  481. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/transport/sse.py +0 -0
  482. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/transport/ws_connection.py +0 -0
  483. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/types/__init__.py +0 -0
  484. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/types/common.py +0 -0
  485. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/types/completions.py +0 -0
  486. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope/types/messages.py +0 -0
  487. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope.egg-info/dependency_links.txt +0 -0
  488. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope.egg-info/not-zip-safe +0 -0
  489. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope.egg-info/requires.txt +0 -0
  490. {dashscope-2.0.3 → dashscope-2.0.4}/dashscope.egg-info/top_level.txt +0 -0
  491. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/applications/apps.py +0 -0
  492. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/audio/README.md +0 -0
  493. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/audio/_common.py +0 -0
  494. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/audio/asr_file.py +0 -0
  495. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/audio/asr_http_stream.py +0 -0
  496. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/audio/asr_microphone.py +0 -0
  497. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/audio/asr_websocket.py +0 -0
  498. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/audio/connection_reuse.py +0 -0
  499. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/audio/direct_call/_common.py +0 -0
  500. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/audio/direct_call/asr_file.py +0 -0
  501. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/audio/direct_call/asr_http_stream.py +0 -0
  502. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/audio/direct_call/asr_microphone.py +0 -0
  503. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/audio/direct_call/asr_websocket.py +0 -0
  504. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/audio/direct_call/connection_reuse.py +0 -0
  505. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/audio/direct_call/realtime_omni.py +0 -0
  506. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/audio/direct_call/realtime_qwen_audio.py +0 -0
  507. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/audio/direct_call/realtime_translation.py +0 -0
  508. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/audio/direct_call/tts_http.py +0 -0
  509. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/audio/direct_call/tts_http_stream.py +0 -0
  510. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/audio/direct_call/tts_websocket.py +0 -0
  511. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/audio/direct_call/voice_clone.py +0 -0
  512. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/audio/realtime_omni.py +0 -0
  513. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/audio/realtime_qwen_audio.py +0 -0
  514. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/audio/realtime_translation.py +0 -0
  515. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/audio/tingwu.py +0 -0
  516. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/audio/tts_http.py +0 -0
  517. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/audio/tts_http_stream.py +0 -0
  518. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/audio/tts_websocket.py +0 -0
  519. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/audio/voice_clone.py +0 -0
  520. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/decision/decision.py +0 -0
  521. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/embeddings/embeddings.py +0 -0
  522. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/files/files.py +0 -0
  523. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/fine_tuning/fine_tunes.py +0 -0
  524. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/fine_tuning/reinforcement_learning.py +0 -0
  525. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/image_video_synthesis/images.py +0 -0
  526. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/image_video_synthesis/videos.py +0 -0
  527. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/models/models.py +0 -0
  528. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/multimodal_vision/multimodal_chat.py +0 -0
  529. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/rerank/rerank.py +0 -0
  530. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/text_generation/chat.py +0 -0
  531. {dashscope-2.0.3 → dashscope-2.0.4}/examples/01_atomic_capabilities/text_generation/tokenization.py +0 -0
  532. {dashscope-2.0.3 → dashscope-2.0.4}/examples/02_advanced_engineering/circuit_breaker_retry.py +0 -0
  533. {dashscope-2.0.3 → dashscope-2.0.4}/examples/02_advanced_engineering/client_side_cache.py +0 -0
  534. {dashscope-2.0.3 → dashscope-2.0.4}/examples/02_advanced_engineering/local_mock_debugging.py +0 -0
  535. {dashscope-2.0.3 → dashscope-2.0.4}/examples/03_agent_recipes/agentstudio.py +0 -0
  536. {dashscope-2.0.3 → dashscope-2.0.4}/examples/03_agent_recipes/agentstudio_deployments.py +0 -0
  537. {dashscope-2.0.3 → dashscope-2.0.4}/examples/03_agent_recipes/mcp_server_demo/server.py +0 -0
  538. {dashscope-2.0.3 → dashscope-2.0.4}/examples/03_agent_recipes/rag_expert_system.py +0 -0
  539. {dashscope-2.0.3 → dashscope-2.0.4}/examples/03_agent_recipes/tool_call_loop.py +0 -0
  540. {dashscope-2.0.3 → dashscope-2.0.4}/examples/04_real_world_scenarios/customer_service_assistant.py +0 -0
  541. {dashscope-2.0.3 → dashscope-2.0.4}/examples/04_real_world_scenarios/production_ready_rag_harness.py +0 -0
  542. {dashscope-2.0.3 → dashscope-2.0.4}/examples/04_real_world_scenarios/realtime_audio_meeting_harness.py +0 -0
  543. {dashscope-2.0.3 → dashscope-2.0.4}/examples/04_real_world_scenarios/ticket_triage_harness.py +0 -0
  544. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/aio_generation/basic.py +0 -0
  545. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/aio_generation/custom_session.py +0 -0
  546. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/aio_generation/deep_research.py +0 -0
  547. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/aio_generation/reasoning.py +0 -0
  548. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/aio_generation/tool_calls.py +0 -0
  549. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/aio_image_synthesis.py +0 -0
  550. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/aio_multimodal_conversation/asr.py +0 -0
  551. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/aio_multimodal_conversation/image.py +0 -0
  552. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/aio_multimodal_conversation/ocr.py +0 -0
  553. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/aio_multimodal_conversation/tool_calls.py +0 -0
  554. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/aio_video_synthesis.py +0 -0
  555. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/application.py +0 -0
  556. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/assistant_api.py +0 -0
  557. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/assistant_api_file.py +0 -0
  558. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/assistant_api_simple.py +0 -0
  559. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/cv_models.py +0 -0
  560. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/generation/basic.py +0 -0
  561. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/generation/custom_session.py +0 -0
  562. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/generation/deep_research.py +0 -0
  563. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/generation/reasoning.py +0 -0
  564. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/generation/tool_calls.py +0 -0
  565. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/image_generation.py +0 -0
  566. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/image_synthesis.py +0 -0
  567. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/multimodal_conversation/asr.py +0 -0
  568. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/multimodal_conversation/image.py +0 -0
  569. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/multimodal_conversation/ocr.py +0 -0
  570. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/multimodal_conversation/reasoning.py +0 -0
  571. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/multimodal_conversation/tool_calls.py +0 -0
  572. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/multimodal_conversation/video.py +0 -0
  573. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/multimodal_embedding.py +0 -0
  574. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/qwen_asr.py +0 -0
  575. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/qwen_tts.py +0 -0
  576. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/set_region_example.py +0 -0
  577. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/text_rerank.py +0 -0
  578. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/tingwu_realtime.py +0 -0
  579. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/tingwu_usages.py +0 -0
  580. {dashscope-2.0.3 → dashscope-2.0.4}/examples/legacy_1x/video_synthesis.py +0 -0
  581. {dashscope-2.0.3 → dashscope-2.0.4}/requirements.txt +0 -0
  582. {dashscope-2.0.3 → dashscope-2.0.4}/setup.cfg +0 -0
  583. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_agentstudio_errors.py +0 -0
  584. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_agentstudio_models.py +0 -0
  585. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_agentstudio_protocol.py +0 -0
  586. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_agentstudio_shim.py +0 -0
  587. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_apps.py +0 -0
  588. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_audio.py +0 -0
  589. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_audio_connection.py +0 -0
  590. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_audio_management.py +0 -0
  591. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_audio_omni_session.py +0 -0
  592. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_audio_samples.py +0 -0
  593. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_audio_samples_direct_call.py +0 -0
  594. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_audio_tts_http.py +0 -0
  595. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_audio_tts_realtime.py +0 -0
  596. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_audio_tts_session.py +0 -0
  597. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_audio_ws_integration.py +0 -0
  598. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_base_url_routing.py +0 -0
  599. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_chat_params.py +0 -0
  600. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_config.py +0 -0
  601. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_decision.py +0 -0
  602. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_error_registry.py +0 -0
  603. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_errors.py +0 -0
  604. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_files_models.py +0 -0
  605. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_finetune_deployments.py +0 -0
  606. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_finetune_rl_shim.py +0 -0
  607. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_http_pool.py +0 -0
  608. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_images_videos.py +0 -0
  609. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_jobs.py +0 -0
  610. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_logging.py +0 -0
  611. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_multimodal.py +0 -0
  612. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_package_root.py +0 -0
  613. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_protocols.py +0 -0
  614. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_rl.py +0 -0
  615. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_settings.py +0 -0
  616. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_sse.py +0 -0
  617. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_sse_comprehensive_verify.py +0 -0
  618. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_tingwu.py +0 -0
  619. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_tools_resources.py +0 -0
  620. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_transport.py +0 -0
  621. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_types_messages.py +0 -0
  622. {dashscope-2.0.3 → dashscope-2.0.4}/tests/test_ws_connection.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dashscope
3
- Version: 2.0.3
3
+ Version: 2.0.4
4
4
  Summary: dashscope client sdk library
5
5
  Home-page: https://dashscope.aliyun.com/
6
6
  Author: Alibaba Cloud
@@ -518,6 +518,26 @@ The SDK ships with an interactive AI assistant, **DashScope SDK Expert**, built
518
518
  - Install with the `acli` extra: `pip install "dashscope[acli]"`. Add `acli-voice` / `acli-camera` for voice and camera input, or `acli-all` for everything — see the [extras table](#installation).
519
519
  - Full walkthrough: [DashScope SDK Expert guide](https://help.aliyun.com/en/model-studio/dashscope-sdk-expert).
520
520
 
521
+ ## Command line
522
+
523
+ `pip install -U dashscope` puts two independent commands on your `PATH`. `dashscope` serves the SDK-shaped **2.0** command tree; `dashscope1` serves the frozen **1.x** implementation:
524
+
525
+ | Entry point | Implementation | Examples |
526
+ |-------------|----------------|----------|
527
+ | `dashscope` | 2.0, following the SDK resource tree | `chat create`, `apps completions create`, `multimodal chat create`, `rl jobs create`, `rl functions register`, `images jobs create`, `audio asr transcribe`, `agentstudio sessions events send` |
528
+ | `dashscope1` | 1.x, using the 1.x SDK | `generation call`, `application call`, `image-synthesis create`, `multimodal-conversation call`, `fine-tunes call`, `agentic-rl run`, `auth login`, `oss upload` |
529
+
530
+ The two CLI trees do not dispatch to or normalize arguments for each other. Running a 1.x-only command through `dashscope` exits with a usage error and points to `dashscope1`. Their module entry points are likewise independent:
531
+
532
+ ```bash
533
+ python -m dashscope.cli apps completions create ...
534
+ python -m dashscope.legacy_1x.cli generation call ...
535
+ ```
536
+
537
+ Running `dashscope` with no arguments starts the [AI assistant](#ai-assistant-dashscope-sdk-expert) instead of the CLI.
538
+
539
+ For the complete 2.0 CLI command map, output formats, exit codes, configuration precedence and CI recipes, see the CLI section in [`examples/README.md`](examples/README.md).
540
+
521
541
  ## Shell completion
522
542
 
523
543
  Run the command for your shell once, then restart the shell (or re-source your config):
@@ -534,6 +554,8 @@ Preview the script without installing:
534
554
  dashscope --show-completion bash
535
555
  ```
536
556
 
557
+ Completion is installed through the 2.0 `dashscope` entry point.
558
+
537
559
  ## Logging
538
560
 
539
561
  Set the level via settings or the environment:
@@ -556,10 +578,11 @@ examples/
556
578
  ├── 02_advanced_engineering/ Mock debugging, semantic cache, circuit breaker + multi-region DR
557
579
  ├── 03_agent_recipes/ Tool-call loop, RAG, MCP server, AgentStudio
558
580
  ├── 04_real_world_scenarios/ End-to-end production harnesses (RAG, realtime meetings, customer service)
581
+ ├── 05_cli/ Offline CLI output/error and subprocess CI harnesses
559
582
  └── legacy_1x/ 1.x module-level API examples, for reference
560
583
  ```
561
584
 
562
- See [`examples/README.md`](examples/README.md). Several flagship cases run fully offline (mock transports) with no API key.
585
+ See [`examples/README.md`](examples/README.md) for the full guide, including the complete CLI command map and shell/CI recipes. Several flagship cases and both CLI harnesses run fully offline with no API key.
563
586
 
564
587
  ## Migrating from 1.x
565
588
 
@@ -577,6 +600,8 @@ The 1.x module-level API is unchanged and still supported — you can adopt 2.0
577
600
  | `dashscope.set_region(region, workspace_id)` | `dashscope.Client(region=..., workspace=...)` |
578
601
  | OpenAI-compatible via `dashscope.aigc.chat_completion.Completions` | `dashscope.Client(protocol="openai")` |
579
602
 
603
+ The CLI follows the same split — see [Command line](#command-line) above.
604
+
580
605
  ### Package layout and compatibility
581
606
 
582
607
  The 2.0 implementation sits directly under `dashscope`; the former `dashscope.v2` namespace is gone. AgentStudio and FineTune/Agentic RL each have a single business core under `dashscope.applications`, with two thin public facades on top:
@@ -437,6 +437,26 @@ The SDK ships with an interactive AI assistant, **DashScope SDK Expert**, built
437
437
  - Install with the `acli` extra: `pip install "dashscope[acli]"`. Add `acli-voice` / `acli-camera` for voice and camera input, or `acli-all` for everything — see the [extras table](#installation).
438
438
  - Full walkthrough: [DashScope SDK Expert guide](https://help.aliyun.com/en/model-studio/dashscope-sdk-expert).
439
439
 
440
+ ## Command line
441
+
442
+ `pip install -U dashscope` puts two independent commands on your `PATH`. `dashscope` serves the SDK-shaped **2.0** command tree; `dashscope1` serves the frozen **1.x** implementation:
443
+
444
+ | Entry point | Implementation | Examples |
445
+ |-------------|----------------|----------|
446
+ | `dashscope` | 2.0, following the SDK resource tree | `chat create`, `apps completions create`, `multimodal chat create`, `rl jobs create`, `rl functions register`, `images jobs create`, `audio asr transcribe`, `agentstudio sessions events send` |
447
+ | `dashscope1` | 1.x, using the 1.x SDK | `generation call`, `application call`, `image-synthesis create`, `multimodal-conversation call`, `fine-tunes call`, `agentic-rl run`, `auth login`, `oss upload` |
448
+
449
+ The two CLI trees do not dispatch to or normalize arguments for each other. Running a 1.x-only command through `dashscope` exits with a usage error and points to `dashscope1`. Their module entry points are likewise independent:
450
+
451
+ ```bash
452
+ python -m dashscope.cli apps completions create ...
453
+ python -m dashscope.legacy_1x.cli generation call ...
454
+ ```
455
+
456
+ Running `dashscope` with no arguments starts the [AI assistant](#ai-assistant-dashscope-sdk-expert) instead of the CLI.
457
+
458
+ For the complete 2.0 CLI command map, output formats, exit codes, configuration precedence and CI recipes, see the CLI section in [`examples/README.md`](examples/README.md).
459
+
440
460
  ## Shell completion
441
461
 
442
462
  Run the command for your shell once, then restart the shell (or re-source your config):
@@ -453,6 +473,8 @@ Preview the script without installing:
453
473
  dashscope --show-completion bash
454
474
  ```
455
475
 
476
+ Completion is installed through the 2.0 `dashscope` entry point.
477
+
456
478
  ## Logging
457
479
 
458
480
  Set the level via settings or the environment:
@@ -475,10 +497,11 @@ examples/
475
497
  ├── 02_advanced_engineering/ Mock debugging, semantic cache, circuit breaker + multi-region DR
476
498
  ├── 03_agent_recipes/ Tool-call loop, RAG, MCP server, AgentStudio
477
499
  ├── 04_real_world_scenarios/ End-to-end production harnesses (RAG, realtime meetings, customer service)
500
+ ├── 05_cli/ Offline CLI output/error and subprocess CI harnesses
478
501
  └── legacy_1x/ 1.x module-level API examples, for reference
479
502
  ```
480
503
 
481
- See [`examples/README.md`](examples/README.md). Several flagship cases run fully offline (mock transports) with no API key.
504
+ See [`examples/README.md`](examples/README.md) for the full guide, including the complete CLI command map and shell/CI recipes. Several flagship cases and both CLI harnesses run fully offline with no API key.
482
505
 
483
506
  ## Migrating from 1.x
484
507
 
@@ -496,6 +519,8 @@ The 1.x module-level API is unchanged and still supported — you can adopt 2.0
496
519
  | `dashscope.set_region(region, workspace_id)` | `dashscope.Client(region=..., workspace=...)` |
497
520
  | OpenAI-compatible via `dashscope.aigc.chat_completion.Completions` | `dashscope.Client(protocol="openai")` |
498
521
 
522
+ The CLI follows the same split — see [Command line](#command-line) above.
523
+
499
524
  ### Package layout and compatibility
500
525
 
501
526
  The 2.0 implementation sits directly under `dashscope`; the former `dashscope.v2` namespace is gone. AgentStudio and FineTune/Agentic RL each have a single business core under `dashscope.applications`, with two thin public facades on top:
@@ -166,7 +166,6 @@ _LEGACY_LAZY_MODULES = frozenset(
166
166
  "applications",
167
167
  "assistants",
168
168
  "audio",
169
- "cli",
170
169
  "common",
171
170
  "embeddings",
172
171
  "files",
@@ -26,7 +26,7 @@ it is the other half of the request identity, and it must agree with
26
26
  (``dashscope/<version>; python/...; platform/...; processor/...``) and is
27
27
  deliberately not shared with the 2.0 transport's own
28
28
  ``dashscope.transport.http.default_user_agent()``
29
- (``dashscope-v2-python/<version>``). Those are two distinct backend
29
+ (``dashscope-sdk-python/<version>``). Those are two distinct backend
30
30
  contracts, not two spellings of one value, so they must not be merged.
31
31
 
32
32
  Only the stdlib is imported at module level; ``dashscope.version`` is
@@ -0,0 +1,143 @@
1
+ # -*- coding: utf-8 -*-
2
+ """Shared DashScope SDK Expert adapter for both console entry points."""
3
+
4
+ import sys
5
+ from pathlib import Path
6
+
7
+ from rich.console import Console
8
+
9
+ import dashscope
10
+
11
+ err_console = Console(stderr=True)
12
+
13
+ _MD_MARKER = "<!-- managed-by: dashscope-expert -->"
14
+ _PY_MARKER = "# managed-by: dashscope-expert"
15
+ _EXPERT_EXAMPLE = "dashscope-sdk-expert"
16
+
17
+
18
+ def _cleanup_legacy_expert_sync():
19
+ """Remove files the deleted expert bundling synced into ~/.acli.
20
+
21
+ Only files carrying the managed marker are deleted — without it the file
22
+ is user-owned and left untouched. Needed so stale global copies don't
23
+ shadow the workspace ./.acli/ configs installed via example download.
24
+ """
25
+ try:
26
+ from dashscope.acli.config import CONFIG_DIR
27
+ except ImportError:
28
+ return
29
+ md_targets = []
30
+ for subdir in ("skills", "references"):
31
+ target_dir = CONFIG_DIR / subdir
32
+ if target_dir.is_dir():
33
+ md_targets.extend(target_dir.glob("*.md"))
34
+ for path in md_targets:
35
+ try:
36
+ if _MD_MARKER in path.read_text(encoding="utf-8"):
37
+ path.unlink()
38
+ except OSError:
39
+ pass
40
+ build = CONFIG_DIR / "build_sdk_index.py"
41
+ try:
42
+ if build.is_file() and _PY_MARKER in build.read_text(encoding="utf-8"):
43
+ build.unlink()
44
+ except OSError:
45
+ pass
46
+
47
+
48
+ def _maybe_offer_example_download():
49
+ """First interactive run without ./.acli: offer the SDK-expert example.
50
+
51
+ Accepting merges the example into ./.acli/ via the same code path as
52
+ `example download` (copied from the packaged install dir when present);
53
+ declining writes a marker into ./.acli/ so we never ask again here.
54
+ """
55
+ if not sys.stdin.isatty() or (Path.cwd() / ".acli").is_dir():
56
+ return
57
+ try:
58
+ from dashscope.acli.cli.examples import _handle_example_command
59
+ from dashscope.acli.cli.handlers_key import _GUIDE_DOC, _doc_locale
60
+ except ImportError:
61
+ return
62
+ err_console.print(
63
+ "[cyan]First run:[/cyan] download the dashscope-sdk-expert "
64
+ "example config into ./.acli/\n"
65
+ "(SDK Q&A expert persona + skill templates + SDK knowledge "
66
+ "index; pure config, editable anytime).",
67
+ )
68
+ err_console.print(
69
+ f"[dim]Guide: {_GUIDE_DOC.format(_doc_locale())}[/dim]",
70
+ )
71
+ try:
72
+ answer = input("Download the example config? [Y/n] ").strip().lower()
73
+ except (EOFError, KeyboardInterrupt):
74
+ err_console.print()
75
+ return
76
+ if answer in ("n", "no"):
77
+ try:
78
+ marker = Path.cwd() / ".acli" / ".dashscope-example-declined"
79
+ marker.parent.mkdir(parents=True, exist_ok=True)
80
+ marker.write_text("declined\n", encoding="utf-8")
81
+ except OSError:
82
+ pass
83
+ err_console.print(
84
+ "[dim]Skipped. To customize later, run: "
85
+ "python -m dashscope.acli example download "
86
+ "dashscope-sdk-expert[/dim]",
87
+ )
88
+ return
89
+ _handle_example_command(["download", _EXPERT_EXAMPLE])
90
+
91
+
92
+ def _route_to_expert(command, tui=None):
93
+ """Run the vendored acli agent (bare ``dashscope`` or ``dashscope expert``).
94
+
95
+ ``command`` is a one-shot prompt, or None for the interactive REPL.
96
+ """
97
+ try:
98
+ from dashscope.acli.cli.handlers_key import _GUIDE_DOC, _doc_locale
99
+ from dashscope.acli.ui.embedded import run
100
+ except ImportError as exception:
101
+ err_console.print(
102
+ "[yellow]Tip:[/yellow] Install dashscope[acli] to enable "
103
+ "the agent "
104
+ f"({exception}).",
105
+ )
106
+ return
107
+
108
+ if command is None and not sys.stdin.isatty():
109
+ # The interactive REPL needs a real terminal; prompt_toolkit crashes
110
+ # on non-tty stdin (e.g. kqueue rejects /dev/null with EINVAL).
111
+ # Treat piped text as a one-shot prompt instead.
112
+ try:
113
+ piped = sys.stdin.read().strip()
114
+ except OSError:
115
+ piped = ""
116
+ if not piped:
117
+ err_console.print(
118
+ "[red]Error:[/red] Interactive mode requires a terminal. "
119
+ 'Pass a prompt instead, e.g. dashscope expert "your question".',
120
+ )
121
+ sys.exit(2)
122
+ command = piped
123
+
124
+ _cleanup_legacy_expert_sync()
125
+ if command is None:
126
+ _maybe_offer_example_download()
127
+
128
+ try:
129
+ run(
130
+ app_name="DashScope SDK Expert",
131
+ prompt_symbol="dashscope> ",
132
+ api_key=dashscope.api_key or None,
133
+ command=command,
134
+ tui=tui,
135
+ module="expert",
136
+ guide_url=_GUIDE_DOC.format(_doc_locale()),
137
+ )
138
+ except SystemExit:
139
+ pass
140
+ except Exception as exception: # pylint: disable=broad-except
141
+ err_console.print(
142
+ f"[yellow]Tip:[/yellow] Agent failed to start ({exception}).",
143
+ )
@@ -0,0 +1,13 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright (c) Alibaba, Inc. and its affiliates.
3
+ """The dashscope CLI (v2).
4
+
5
+ Deliberately empty. ``import dashscope.cli`` runs for shell completion and
6
+ ``--help``, so it must not pull in the router, Typer, or the SDK.
7
+
8
+ There is no ``main`` re-export here on purpose: :mod:`dashscope.cli.main`
9
+ is a submodule, and binding the same name on the package would make
10
+ ``from dashscope.cli import main`` resolve to a function or a module
11
+ depending on import order. The console script names the module directly
12
+ (``dashscope.cli.main:main``).
13
+ """
@@ -0,0 +1,8 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright (c) Alibaba, Inc. and its affiliates.
3
+ """``python -m dashscope.cli``."""
4
+
5
+ from dashscope.cli.main import main
6
+
7
+ if __name__ == "__main__":
8
+ main()
@@ -0,0 +1,213 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright (c) Alibaba, Inc. and its affiliates.
3
+ """The root Typer app: global options, ``version``, and the command groups.
4
+
5
+ Global options follow click's convention and precede the subcommand::
6
+
7
+ dashscope -k sk-xxx --output json chat create -m qwen-plus --prompt hi
8
+
9
+ The 1.x command tree is installed separately as ``dashscope1`` and is never
10
+ imported or executed by this app.
11
+ """
12
+
13
+ from __future__ import annotations
14
+
15
+ from typing import List, Optional
16
+
17
+ import typer
18
+
19
+ from dashscope.cli.context import CliContext, GlobalOptions
20
+ from dashscope.cli.errors import ErrorHandlingGroup, usage_error
21
+ from dashscope.cli.output import OUTPUT_FORMATS
22
+
23
+ # `\[` is Rich markup escaping: unescaped, Rich reads the bracketed run as a
24
+ # style tag and drops it from the rendered help. The string is raw so the
25
+ # backslash survives to Rich -- which also means it cannot open with `"""\`,
26
+ # since a raw string keeps that backslash too.
27
+ _HELP = r"""Manage DashScope resources from the command line.
28
+
29
+ Global options come before the command: `dashscope -k sk-xxx --output json
30
+ ft list`. Errors go to stderr as `Error \[category]: message` and the exit
31
+ code says which kind: 0 ok, 1 server/rate-limit/network, 2 bad command
32
+ line, 3 auth, 4 not found.
33
+ """
34
+
35
+
36
+ def _epilog() -> str:
37
+ return (
38
+ "CLI 1.x commands such as `generation create` and `application create` "
39
+ "have moved to `dashscope1`. A bare `dashscope` opens the bundled "
40
+ "`expert` agent interactively."
41
+ )
42
+
43
+
44
+ def build_app() -> typer.Typer:
45
+ """Assemble the v2 CLI. Called once per process by ``main()``."""
46
+ app = typer.Typer(
47
+ name="dashscope",
48
+ cls=ErrorHandlingGroup,
49
+ help=_HELP,
50
+ epilog=_epilog(),
51
+ add_completion=True,
52
+ no_args_is_help=True,
53
+ rich_markup_mode="rich",
54
+ context_settings={"help_option_names": ["-h", "--help"]},
55
+ )
56
+
57
+ @app.callback()
58
+ def root( # pylint: disable=too-many-arguments,too-many-locals
59
+ ctx: typer.Context,
60
+ api_key: Optional[str] = typer.Option(
61
+ None,
62
+ "-k",
63
+ "--api-key",
64
+ help="DashScope API key. Overrides the environment and config file.",
65
+ ),
66
+ protocol: Optional[str] = typer.Option(
67
+ None,
68
+ "--protocol",
69
+ help="Wire protocol: native, openai or anthropic.",
70
+ ),
71
+ base_url: Optional[str] = typer.Option(
72
+ None,
73
+ "--base-url",
74
+ help="Override the service base URL.",
75
+ ),
76
+ workspace: Optional[str] = typer.Option(
77
+ None,
78
+ "--workspace",
79
+ help="DashScope workspace (business space) id.",
80
+ ),
81
+ region: Optional[str] = typer.Option(
82
+ None,
83
+ "--region",
84
+ help="Service region, e.g. cn-beijing or ap-southeast-1.",
85
+ ),
86
+ timeout: Optional[float] = typer.Option(
87
+ None,
88
+ "--timeout",
89
+ help="Per-request timeout in seconds.",
90
+ ),
91
+ output: Optional[str] = typer.Option(
92
+ None,
93
+ "-o",
94
+ "--output",
95
+ help="Output format. Machine formats keep stdout parseable.",
96
+ ),
97
+ config_override: Optional[List[str]] = typer.Option(
98
+ None,
99
+ "-c",
100
+ metavar="KEY=VALUE",
101
+ help=(
102
+ "Override one config key for this invocation; repeatable. "
103
+ "SDK keys (api_key, protocol, timeout, ...) are passed to "
104
+ "the client, CLI keys (output, default_model) set defaults."
105
+ ),
106
+ ),
107
+ no_color: bool = typer.Option(
108
+ False,
109
+ "--no-color",
110
+ help="Disable colored output. Also honours $NO_COLOR.",
111
+ ),
112
+ verbose: bool = typer.Option(
113
+ False,
114
+ "-v",
115
+ "--verbose",
116
+ help="Show request metadata and tracebacks on failure.",
117
+ ),
118
+ ) -> None:
119
+ """Configure global options."""
120
+ if output is not None and output not in OUTPUT_FORMATS:
121
+ raise usage_error(
122
+ f"invalid --output {output!r}, expected one of "
123
+ f"{', '.join(OUTPUT_FORMATS)}",
124
+ )
125
+ ctx.obj = CliContext(
126
+ GlobalOptions(
127
+ api_key=api_key,
128
+ protocol=protocol,
129
+ base_url=base_url,
130
+ workspace=workspace,
131
+ region=region,
132
+ timeout=timeout,
133
+ output=output,
134
+ overrides=tuple(config_override or ()),
135
+ no_color=no_color,
136
+ verbose=verbose,
137
+ ),
138
+ )
139
+ # Resolve the -c overrides now rather than on first SDK use, so a
140
+ # misspelled key fails on every command -- including ones like
141
+ # `version` that never touch the service. This reads no files and
142
+ # builds no client.
143
+ ctx.obj.sdk_overrides()
144
+
145
+ @app.command()
146
+ def version(ctx: typer.Context) -> None:
147
+ """Print the installed dashscope version."""
148
+ # Imported here rather than at module scope: this command is the
149
+ # cheapest thing the CLI does and should stay that way.
150
+ from dashscope.version import (
151
+ __version__,
152
+ ) # pylint: disable=import-outside-toplevel
153
+
154
+ renderer = ctx.obj.renderer
155
+ if renderer.table_mode:
156
+ renderer.echo(__version__)
157
+ else:
158
+ renderer.print_object({"version": __version__})
159
+
160
+ # Command modules are thin by contract (no SDK import at module
161
+ # scope), so mounting them all here costs nothing; the expensive part
162
+ # is the client, which stays lazy behind ``ctx.obj.client``.
163
+ from dashscope.cli.commands import (
164
+ agentstudio as agentstudio_command,
165
+ apps as apps_command,
166
+ audio as audio_command,
167
+ auth as auth_command,
168
+ chat as chat_command,
169
+ config as config_command,
170
+ decision as decision_command,
171
+ deployments as deployments_command,
172
+ embeddings as embeddings_command,
173
+ files as files_command,
174
+ ft as ft_command,
175
+ images as images_command,
176
+ models as models_command,
177
+ multimodal as multimodal_command,
178
+ oss as oss_command,
179
+ rerank as rerank_command,
180
+ rl as rl_command,
181
+ tingwu as tingwu_command,
182
+ tokenization as tokenization_command,
183
+ videos as videos_command,
184
+ )
185
+
186
+ app.add_typer(auth_command.build_app(), name="auth")
187
+ app.add_typer(chat_command.build_app(), name="chat")
188
+ app.add_typer(ft_command.build_app(), name="ft")
189
+ # Hidden alias, following the 1.x tree's convention: the long name stays
190
+ # usable but out of the way. Built twice so the two registrations do not
191
+ # share one Typer instance.
192
+ app.add_typer(ft_command.build_app(), name="fine-tunes", hidden=True)
193
+ app.add_typer(files_command.build_app(), name="files")
194
+ app.add_typer(models_command.build_app(), name="models")
195
+ app.add_typer(oss_command.build_app(), name="oss")
196
+ app.add_typer(images_command.build_app(), name="images")
197
+ app.add_typer(videos_command.build_app(), name="videos")
198
+ app.add_typer(embeddings_command.build_app(), name="embeddings")
199
+ app.add_typer(multimodal_command.build_app(), name="multimodal")
200
+ app.add_typer(rerank_command.build_app(), name="rerank")
201
+ app.add_typer(tokenization_command.build_app(), name="tokenization")
202
+ app.add_typer(apps_command.build_app(), name="apps")
203
+ app.add_typer(deployments_command.build_app(), name="deployments")
204
+ app.add_typer(rl_command.build_app(), name="rl")
205
+ # Hidden alias of ``rl``, mirroring the ``fine-tunes`` alias of ``ft``.
206
+ app.add_typer(rl_command.build_app(), name="agentic-rl", hidden=True)
207
+ app.add_typer(audio_command.build_app(), name="audio")
208
+ app.add_typer(tingwu_command.build_app(), name="tingwu")
209
+ app.add_typer(decision_command.build_app(), name="decision")
210
+ app.add_typer(agentstudio_command.build_app(), name="agentstudio")
211
+ app.add_typer(config_command.build_app(), name="config")
212
+
213
+ return app
@@ -0,0 +1,15 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright (c) Alibaba, Inc. and its affiliates.
3
+ """Command groups for the dashscope CLI.
4
+
5
+ Every module here follows the same shape, which is the pattern the rest
6
+ of the command tree is meant to copy: declare options with typer, take
7
+ ``ctx: typer.Context`` as the first parameter, make exactly one SDK call
8
+ through ``ctx.obj.client``, and hand the result to ``ctx.obj.renderer``.
9
+
10
+ The rule that keeps ``--help`` fast is structural: **no module in this
11
+ package may import ``dashscope`` at module scope.** Importing the SDK
12
+ pulls in pydantic, httpx and the 1.x resource tree; a user reading
13
+ ``dashscope chat create --help`` should not wait for any of it. Reach the
14
+ SDK only through ``ctx.obj.client``, which is built on first use.
15
+ """