dashscope 1.27.4__tar.gz → 1.27.6__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 (367) hide show
  1. {dashscope-1.27.4 → dashscope-1.27.6}/PKG-INFO +97 -13
  2. {dashscope-1.27.4 → dashscope-1.27.6}/README.md +83 -1
  3. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/__init__.py +47 -0
  4. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/__init__.pyi +1 -0
  5. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/__init__.py +1 -1
  6. dashscope-1.27.6/dashscope/acli/acceptance.py +355 -0
  7. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/agent.py +280 -77
  8. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/agents/delegate.py +14 -18
  9. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/agents/subagent.py +3 -3
  10. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/agents/subagents.py +32 -10
  11. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/cli/dispatch.py +9 -1
  12. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/cli/examples.py +6 -0
  13. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/cli/handlers_key.py +53 -14
  14. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/cli/handlers_misc.py +41 -33
  15. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/cli/handlers_provider.py +23 -2
  16. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/cli/runners.py +105 -3
  17. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/cli/startup.py +5 -0
  18. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/compression.py +54 -3
  19. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/config.py +12 -5
  20. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/dev.py +12 -13
  21. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/examples/basic-chat/.acli/custom-extensions.toml +26 -60
  22. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/examples/basic-chat/README.md +2 -2
  23. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/examples/dashscope-sdk-expert/README.md +2 -0
  24. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/executor.py +264 -14
  25. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/memory/manager.py +22 -3
  26. dashscope-1.27.6/dashscope/acli/memory/reflection.py +727 -0
  27. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/providers/__init__.py +2 -0
  28. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/providers/adapter.py +2 -2
  29. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/providers/anthropic.py +24 -4
  30. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/providers/hardening.py +61 -7
  31. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/providers/openai.py +1 -1
  32. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/providers/profile.py +3 -1
  33. dashscope-1.27.6/dashscope/acli/providers/tongyi.py +670 -0
  34. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/sdk.py +4 -0
  35. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/tools/filesystem.py +46 -8
  36. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/tools/session.py +1 -4
  37. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/tools/shell.py +134 -44
  38. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/ui/embedded.py +9 -0
  39. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/ui/tui.py +39 -12
  40. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/utils/messages.py +9 -2
  41. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/utils/text.py +38 -3
  42. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/agentstudio/__init__.py +22 -2
  43. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/agentstudio/client.py +13 -0
  44. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/agentstudio/constants.py +38 -5
  45. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/agentstudio/resources/_helpers.py +34 -0
  46. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/agentstudio/resources/deployments.py +8 -0
  47. dashscope-1.27.6/dashscope/agentstudio/resources/security.py +136 -0
  48. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/agentstudio/resources/session_events.py +83 -38
  49. dashscope-1.27.6/dashscope/agentstudio/resources/session_resources.py +186 -0
  50. dashscope-1.27.6/dashscope/agentstudio/resources/session_threads.py +250 -0
  51. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/agentstudio/resources/sessions.py +12 -0
  52. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/agentstudio/types/__init__.py +5 -1
  53. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/agentstudio/types/models.py +381 -23
  54. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/agentstudio/types/params.py +111 -4
  55. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/api_entities/api_request_factory.py +14 -2
  56. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/api_entities/encryption.py +5 -1
  57. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/api_entities/websocket_request.py +22 -15
  58. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/audio/asr/recognition.py +23 -2
  59. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/audio/http_tts/http_speech_synthesizer.py +4 -4
  60. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/audio/qwen_omni/omni_realtime.py +11 -0
  61. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/audio/tts_v2/speech_synthesizer.py +2 -1
  62. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/cli/__init__.py +49 -11
  63. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/cli/agentic_rl.py +11 -4
  64. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/cli/deployments.py +2 -0
  65. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/client/base_api.py +70 -30
  66. dashscope-1.27.6/dashscope/common/env.py +145 -0
  67. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/agentic_rl.py +225 -2
  68. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/deployments.py +1 -1
  69. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/__init__.py +4 -0
  70. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/common/constants.py +8 -0
  71. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/common/model.py +238 -2
  72. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/common/model_types.py +1 -0
  73. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/common/utils.py +26 -8
  74. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/data/base_data_model.py +11 -0
  75. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/data/reward_output.py +13 -2
  76. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/data/rollout_output.py +13 -2
  77. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/multimodal/multimodal_dialog.py +2 -0
  78. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/multimodal/tingwu/tingwu_realtime.py +3 -3
  79. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/version.py +1 -1
  80. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope.egg-info/PKG-INFO +97 -13
  81. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope.egg-info/SOURCES.txt +4 -0
  82. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope.egg-info/requires.txt +9 -9
  83. {dashscope-1.27.4 → dashscope-1.27.6}/requirements.txt +1 -1
  84. {dashscope-1.27.4 → dashscope-1.27.6}/setup.py +13 -11
  85. dashscope-1.27.4/dashscope/acli/memory/reflection.py +0 -337
  86. dashscope-1.27.4/dashscope/acli/providers/tongyi.py +0 -453
  87. dashscope-1.27.4/dashscope/common/env.py +0 -31
  88. {dashscope-1.27.4 → dashscope-1.27.6}/LICENSE +0 -0
  89. {dashscope-1.27.4 → dashscope-1.27.6}/LICENSE.certifi +0 -0
  90. {dashscope-1.27.4 → dashscope-1.27.6}/MANIFEST.in +0 -0
  91. {dashscope-1.27.4 → dashscope-1.27.6}/NOTICE +0 -0
  92. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/__main__.py +0 -0
  93. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/agents/__init__.py +0 -0
  94. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/audit.py +0 -0
  95. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/capabilities/__init__.py +0 -0
  96. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/capabilities/local_memory.py +0 -0
  97. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/cli/__init__.py +0 -0
  98. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/cli/completer.py +0 -0
  99. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/cli/constants.py +0 -0
  100. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/cli/handlers_capability.py +0 -0
  101. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/cli/handlers_config.py +0 -0
  102. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/cli/handlers_device.py +0 -0
  103. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/cli/handlers_profile.py +0 -0
  104. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/cli/handlers_session.py +0 -0
  105. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/cli/handlers_setup.py +0 -0
  106. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/cli/handlers_skill.py +0 -0
  107. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/cli/mcp.py +0 -0
  108. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/cli/multimodal.py +0 -0
  109. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/cli/repl.py +0 -0
  110. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/cli/streaming.py +0 -0
  111. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/commands.py +0 -0
  112. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/debuglog.py +0 -0
  113. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/deliverable.py +0 -0
  114. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/eval/__init__.py +0 -0
  115. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/examples/basic-chat/.acli/config.toml +0 -0
  116. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/examples/basic-chat/.acli/hooks.toml +0 -0
  117. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/examples/basic-chat/.acli/skills/explain-code.md +0 -0
  118. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/examples/basic-chat/.acli/skills/research-topic.md +0 -0
  119. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/examples/basic-chat/.acli/skills/translate.md +0 -0
  120. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/examples/basic-chat/.acli/skills/write-poem.md +0 -0
  121. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/examples/basic-chat/.acli/system-prompt.md +0 -0
  122. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/examples/dashscope-sdk-expert/.acli/config.toml +0 -0
  123. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/examples/dashscope-sdk-expert/.acli/custom-extensions.toml +0 -0
  124. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/examples/dashscope-sdk-expert/.acli/hooks.toml +0 -0
  125. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/agent.md +0 -0
  126. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/api-doc.md +0 -0
  127. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/cli.md +0 -0
  128. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/diagnose.md +0 -0
  129. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/error-code.md +0 -0
  130. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/explain-code.md +0 -0
  131. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/fine-tuning.md +0 -0
  132. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/multimodal.md +0 -0
  133. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/retrieval.md +0 -0
  134. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/sdk-example.md +0 -0
  135. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/speech.md +0 -0
  136. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/text-generation.md +0 -0
  137. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/translate.md +0 -0
  138. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/examples/dashscope-sdk-expert/.acli/system-prompt.md +0 -0
  139. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/extensions.py +0 -0
  140. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/hooks.py +0 -0
  141. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/mcp_server.py +0 -0
  142. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/mcp_stdio.py +0 -0
  143. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/memory/__init__.py +0 -0
  144. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/memory/directives_learning.py +0 -0
  145. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/memory/experience.py +0 -0
  146. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/memory/plan.py +0 -0
  147. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/memory/skill_evolution.py +0 -0
  148. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/memory/tool_chains.py +0 -0
  149. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/memory/trace.py +0 -0
  150. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/permission.py +0 -0
  151. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/platforms/__init__.py +0 -0
  152. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/platforms/bailian/__init__.py +0 -0
  153. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/platforms/bailian/cli.py +0 -0
  154. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/platforms/bailian/mcp.py +0 -0
  155. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/platforms/base.py +0 -0
  156. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/platforms/local/__init__.py +0 -0
  157. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/platforms/local/history.py +0 -0
  158. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/platforms/local/memory.py +0 -0
  159. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/prompt.py +0 -0
  160. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/prompt_pipeline.py +0 -0
  161. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/providers/base.py +0 -0
  162. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/sandbox.py +0 -0
  163. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/scheduler.py +0 -0
  164. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/session.py +0 -0
  165. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/session_events.py +0 -0
  166. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/skills/__init__.py +0 -0
  167. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/skills/base.py +0 -0
  168. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/skills/manager.py +0 -0
  169. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/skills/package.py +0 -0
  170. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/skills/store.py +0 -0
  171. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/tools/__init__.py +0 -0
  172. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/tools/browser.py +0 -0
  173. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/tools/camera.py +0 -0
  174. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/tools/checkpoint.py +0 -0
  175. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/tools/evolution.py +0 -0
  176. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/tools/platform.py +0 -0
  177. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/tools/registry.py +0 -0
  178. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/tools/skills.py +0 -0
  179. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/tools/vision.py +0 -0
  180. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/tools/web_search.py +0 -0
  181. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/ui/__init__.py +0 -0
  182. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/ui/camera.py +0 -0
  183. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/ui/tts.py +0 -0
  184. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/ui/voice.py +0 -0
  185. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/utils/__init__.py +0 -0
  186. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/utils/clipboard.py +0 -0
  187. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/utils/crypto.py +0 -0
  188. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/utils/exceptions.py +0 -0
  189. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/utils/ids.py +0 -0
  190. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/utils/images.py +0 -0
  191. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/utils/keywords.py +0 -0
  192. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/utils/paths.py +0 -0
  193. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/utils/sanitizer.py +0 -0
  194. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/utils/spinner.py +0 -0
  195. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/utils/template.py +0 -0
  196. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/utils/toml.py +0 -0
  197. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/acli/utils/validation.py +0 -0
  198. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/agentstudio/exceptions.py +0 -0
  199. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/agentstudio/pagination.py +0 -0
  200. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/agentstudio/resources/__init__.py +0 -0
  201. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/agentstudio/resources/agents.py +0 -0
  202. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/agentstudio/resources/environments.py +0 -0
  203. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/agentstudio/resources/files.py +0 -0
  204. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/agentstudio/resources/skills.py +0 -0
  205. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/agentstudio/resources/vaults.py +0 -0
  206. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/agentstudio/resources/webhook_endpoints.py +0 -0
  207. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/agentstudio/streaming.py +0 -0
  208. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/agentstudio/transport.py +0 -0
  209. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/aigc/__init__.py +0 -0
  210. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/aigc/chat_completion.py +0 -0
  211. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/aigc/code_generation.py +0 -0
  212. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/aigc/conversation.py +0 -0
  213. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/aigc/generation.py +0 -0
  214. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/aigc/image_generation.py +0 -0
  215. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/aigc/image_synthesis.py +0 -0
  216. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/aigc/multimodal_conversation.py +0 -0
  217. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/aigc/video_synthesis.py +0 -0
  218. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/api_entities/__init__.py +0 -0
  219. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/api_entities/aio_session.py +0 -0
  220. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/api_entities/aiohttp_request.py +0 -0
  221. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/api_entities/api_request_data.py +0 -0
  222. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/api_entities/base_request.py +0 -0
  223. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/api_entities/chat_completion_types.py +0 -0
  224. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/api_entities/dashscope_response.py +0 -0
  225. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/api_entities/http_request.py +0 -0
  226. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/app/__init__.py +0 -0
  227. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/app/application.py +0 -0
  228. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/app/application_response.py +0 -0
  229. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/assistants/__init__.py +0 -0
  230. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/assistants/assistant_types.py +0 -0
  231. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/assistants/assistants.py +0 -0
  232. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/assistants/files.py +0 -0
  233. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/audio/__init__.py +0 -0
  234. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/audio/asr/__init__.py +0 -0
  235. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/audio/asr/asr_phrase_manager.py +0 -0
  236. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/audio/asr/transcription.py +0 -0
  237. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/audio/asr/translation_recognizer.py +0 -0
  238. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/audio/asr/vocabulary.py +0 -0
  239. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/audio/http_tts/__init__.py +0 -0
  240. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/audio/qwen_asr/__init__.py +0 -0
  241. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/audio/qwen_asr/qwen_transcription.py +0 -0
  242. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/audio/qwen_omni/__init__.py +0 -0
  243. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/audio/qwen_tts/__init__.py +0 -0
  244. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/audio/qwen_tts/speech_synthesizer.py +0 -0
  245. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/audio/qwen_tts_realtime/__init__.py +0 -0
  246. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/audio/qwen_tts_realtime/qwen_tts_realtime.py +0 -0
  247. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/audio/tts/__init__.py +0 -0
  248. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/audio/tts/speech_synthesizer.py +0 -0
  249. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/audio/tts_v2/__init__.py +0 -0
  250. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/audio/tts_v2/enrollment.py +0 -0
  251. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/cli/__main__.py +0 -0
  252. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/cli/application.py +0 -0
  253. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/cli/auth.py +0 -0
  254. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/cli/code_generation.py +0 -0
  255. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/cli/common.py +0 -0
  256. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/cli/embeddings.py +0 -0
  257. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/cli/files.py +0 -0
  258. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/cli/fine_tunes.py +0 -0
  259. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/cli/generation.py +0 -0
  260. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/cli/image_generation.py +0 -0
  261. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/cli/image_synthesis.py +0 -0
  262. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/cli/models.py +0 -0
  263. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/cli/multimodal_conversation.py +0 -0
  264. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/cli/multimodal_embedding.py +0 -0
  265. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/cli/oss.py +0 -0
  266. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/cli/rerank.py +0 -0
  267. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/cli/speech_synthesis.py +0 -0
  268. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/cli/tokenization.py +0 -0
  269. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/cli/transcription.py +0 -0
  270. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/cli/understanding.py +0 -0
  271. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/cli/video_synthesis.py +0 -0
  272. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/client/__init__.py +0 -0
  273. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/common/__init__.py +0 -0
  274. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/common/api_key.py +0 -0
  275. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/common/base_type.py +0 -0
  276. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/common/constants.py +0 -0
  277. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/common/error.py +0 -0
  278. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/common/logging.py +0 -0
  279. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/common/message_manager.py +0 -0
  280. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/common/utils.py +0 -0
  281. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/embeddings/__init__.py +0 -0
  282. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/embeddings/batch_text_embedding.py +0 -0
  283. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/embeddings/batch_text_embedding_response.py +0 -0
  284. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/embeddings/multimodal_embedding.py +0 -0
  285. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/embeddings/text_embedding.py +0 -0
  286. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/files.py +0 -0
  287. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/__init__.py +0 -0
  288. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/customize_types.py +0 -0
  289. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/finetunes.py +0 -0
  290. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/common/__init__.py +0 -0
  291. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/common/errors.py +0 -0
  292. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/common/log.py +0 -0
  293. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/__init__.py +0 -0
  294. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/data/__init__.py +0 -0
  295. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/data/group_reward_input.py +0 -0
  296. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/data/group_reward_output.py +0 -0
  297. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/data/reward_input.py +0 -0
  298. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/data/rollout_input.py +0 -0
  299. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/demo/__init__.py +0 -0
  300. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/demo/group_reward_processor_demo.py +0 -0
  301. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/demo/reward_processor_demo.py +0 -0
  302. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/demo/rollout_processor_demo.py +0 -0
  303. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/func_decorator.py +0 -0
  304. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/func_manager.py +0 -0
  305. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/observability/__init__.py +0 -0
  306. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/observability/genai/__init__.py +0 -0
  307. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/observability/genai/_core.py +0 -0
  308. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/observability/genai/llm_dashscope.py +0 -0
  309. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/observability/genai/llm_openai.py +0 -0
  310. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/observability/genai/llm_span.py +0 -0
  311. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/observability/genai/messages.py +0 -0
  312. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/observability/genai/tools.py +0 -0
  313. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/observability/processor_span.py +0 -0
  314. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/observability/tracing.py +0 -0
  315. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/parser/__init__.py +0 -0
  316. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/parser/base_parser.py +0 -0
  317. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/parser/group_reward_parser.py +0 -0
  318. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/parser/reward_parser.py +0 -0
  319. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/parser/rollout_parser.py +0 -0
  320. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/processor/__init__.py +0 -0
  321. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/processor/abstract_group_reward_processor.py +0 -0
  322. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/processor/abstract_processor.py +0 -0
  323. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/processor/abstract_reward_processor.py +0 -0
  324. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/processor/abstract_rollout_processor.py +0 -0
  325. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/server/__init__.py +0 -0
  326. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/finetune/reinforcement/component/server/server.py +0 -0
  327. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/io/__init__.py +0 -0
  328. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/io/input_output.py +0 -0
  329. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/model.py +0 -0
  330. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/models.py +0 -0
  331. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/multimodal/__init__.py +0 -0
  332. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/multimodal/dialog_state.py +0 -0
  333. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/multimodal/multimodal_constants.py +0 -0
  334. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/multimodal/multimodal_request_params.py +0 -0
  335. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/multimodal/tingwu/__init__.py +0 -0
  336. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/multimodal/tingwu/tingwu.py +0 -0
  337. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/nlp/__init__.py +0 -0
  338. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/nlp/understanding.py +0 -0
  339. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/protocol/__init__.py +0 -0
  340. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/protocol/websocket.py +0 -0
  341. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/py.typed +0 -0
  342. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/rerank/__init__.py +0 -0
  343. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/rerank/text_rerank.py +0 -0
  344. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/resources/qwen.tiktoken +0 -0
  345. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/threads/__init__.py +0 -0
  346. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/threads/messages/__init__.py +0 -0
  347. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/threads/messages/files.py +0 -0
  348. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/threads/messages/messages.py +0 -0
  349. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/threads/runs/__init__.py +0 -0
  350. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/threads/runs/runs.py +0 -0
  351. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/threads/runs/steps.py +0 -0
  352. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/threads/thread_types.py +0 -0
  353. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/threads/threads.py +0 -0
  354. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/tokenizers/__init__.py +0 -0
  355. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/tokenizers/qwen_tokenizer.py +0 -0
  356. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/tokenizers/tokenization.py +0 -0
  357. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/tokenizers/tokenizer.py +0 -0
  358. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/tokenizers/tokenizer_base.py +0 -0
  359. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/utils/__init__.py +0 -0
  360. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/utils/message_utils.py +0 -0
  361. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/utils/oss_utils.py +0 -0
  362. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope/utils/param_utils.py +0 -0
  363. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope.egg-info/dependency_links.txt +0 -0
  364. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope.egg-info/entry_points.txt +0 -0
  365. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope.egg-info/not-zip-safe +0 -0
  366. {dashscope-1.27.4 → dashscope-1.27.6}/dashscope.egg-info/top_level.txt +0 -0
  367. {dashscope-1.27.4 → dashscope-1.27.6}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dashscope
3
- Version: 1.27.4
3
+ Version: 1.27.6
4
4
  Summary: dashscope client sdk library
5
5
  Home-page: https://dashscope.aliyun.com/
6
6
  Author: Alibaba Cloud
@@ -12,11 +12,13 @@ Classifier: Intended Audience :: Developers
12
12
  Classifier: License :: OSI Approved :: Apache Software License
13
13
  Classifier: Programming Language :: Python
14
14
  Classifier: Programming Language :: Python :: 3
15
- Classifier: Programming Language :: Python :: 3.8
16
15
  Classifier: Programming Language :: Python :: 3.9
17
16
  Classifier: Programming Language :: Python :: 3.10
18
17
  Classifier: Programming Language :: Python :: 3.11
19
- Requires-Python: >=3.8.0
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Requires-Python: >=3.9
20
22
  Description-Content-Type: text/markdown
21
23
  License-File: LICENSE
22
24
  License-File: LICENSE.certifi
@@ -28,35 +30,35 @@ Requires-Dist: cryptography
28
30
  Requires-Dist: certifi
29
31
  Requires-Dist: typer>=0.9.0
30
32
  Requires-Dist: rich>=13.0.0
31
- Requires-Dist: httpx>=0.25.0
33
+ Requires-Dist: httpx>=0.27.0
32
34
  Requires-Dist: httpx-sse>=0.4.0
33
35
  Requires-Dist: typing_extensions>=4.0
34
36
  Provides-Extra: tokenizer
35
37
  Requires-Dist: tiktoken; extra == "tokenizer"
36
38
  Provides-Extra: acli
37
39
  Requires-Dist: prompt-toolkit>=3.0; extra == "acli"
38
- Requires-Dist: textual>=0.50; extra == "acli"
40
+ Requires-Dist: textual<9,>=0.50; extra == "acli"
39
41
  Requires-Dist: PyYAML>=6.0; extra == "acli"
40
42
  Requires-Dist: tomli>=2.0; python_version < "3.11" and extra == "acli"
41
43
  Provides-Extra: acli-anthropic
42
- Requires-Dist: anthropic>=0.40; extra == "acli-anthropic"
44
+ Requires-Dist: anthropic<2,>=0.40; extra == "acli-anthropic"
43
45
  Provides-Extra: acli-openai
44
- Requires-Dist: openai>=1.30; extra == "acli-openai"
46
+ Requires-Dist: openai<4,>=1.30; extra == "acli-openai"
45
47
  Provides-Extra: acli-voice
46
48
  Requires-Dist: sounddevice>=0.4; extra == "acli-voice"
47
49
  Requires-Dist: numpy>=1.20; extra == "acli-voice"
48
50
  Provides-Extra: acli-camera
49
- Requires-Dist: opencv-python>=4.5; extra == "acli-camera"
51
+ Requires-Dist: opencv-python-headless>=4.5; extra == "acli-camera"
50
52
  Provides-Extra: acli-all
51
53
  Requires-Dist: prompt-toolkit>=3.0; extra == "acli-all"
52
- Requires-Dist: textual>=0.50; extra == "acli-all"
54
+ Requires-Dist: textual<9,>=0.50; extra == "acli-all"
53
55
  Requires-Dist: PyYAML>=6.0; extra == "acli-all"
54
56
  Requires-Dist: tomli>=2.0; python_version < "3.11" and extra == "acli-all"
55
- Requires-Dist: anthropic>=0.40; extra == "acli-all"
56
- Requires-Dist: openai>=1.30; extra == "acli-all"
57
+ Requires-Dist: anthropic<2,>=0.40; extra == "acli-all"
58
+ Requires-Dist: openai<4,>=1.30; extra == "acli-all"
57
59
  Requires-Dist: sounddevice>=0.4; extra == "acli-all"
58
60
  Requires-Dist: numpy>=1.20; extra == "acli-all"
59
- Requires-Dist: opencv-python>=4.5; extra == "acli-all"
61
+ Requires-Dist: opencv-python-headless>=4.5; extra == "acli-all"
60
62
  Provides-Extra: rl
61
63
  Requires-Dist: pydantic>=2.0; extra == "rl"
62
64
  Requires-Dist: tenacity; extra == "rl"
@@ -132,7 +134,7 @@ else:
132
134
 
133
135
  ## API Key Authentication
134
136
 
135
- The SDK uses API key for authentication. Please refer to [official documentation for alibabacloud china](https://www.alibabacloud.com/help/en/model-studio/) and [official documentation for alibabacloud international](https://www.alibabacloud.com/help/en/model-studio/) regarding how to obtain your api-key.
137
+ The SDK uses API key for authentication. To obtain an API Key, see [How to get an API Key](https://help.aliyun.com/en/model-studio/get-api-key). Please refer to [official documentation for alibabacloud china](https://www.alibabacloud.com/help/en/model-studio/) and [official documentation for alibabacloud international](https://www.alibabacloud.com/help/en/model-studio/) regarding how to obtain your api-key.
136
138
 
137
139
  ### Using the API Key
138
140
 
@@ -169,12 +171,94 @@ save_api_key(api_key='YOUR-DASHSCOPE-API-KEY',
169
171
 
170
172
  ```
171
173
 
174
+ ## Region and Endpoint Configuration
175
+
176
+ By default the SDK sends requests to the China (Beijing) public endpoint `dashscope.aliyuncs.com`. If your Model Studio (Bailian) workspace lives in another region, switch the endpoint before making calls.
177
+
178
+ ### Using `set_region`
179
+
180
+ `dashscope.set_region(region, workspace_id)` points the HTTP, WebSocket and OpenAI-compatible base URLs at the given region in a single call. `workspace_id` is required and is used as the endpoint subdomain.
181
+
182
+ ```python
183
+ import dashscope
184
+
185
+ # Switch to the Singapore region for workspace "ws-xxx123"
186
+ dashscope.set_region(region="ap-southeast-1", workspace_id="ws-xxx123")
187
+
188
+ # All subsequent calls use:
189
+ # https://ws-xxx123.ap-southeast-1.maas.aliyuncs.com/api/v1
190
+ print(dashscope.base_http_api_url)
191
+ ```
192
+
193
+ Supported regions:
194
+
195
+ | Region | Location |
196
+ |--------|----------|
197
+ | `cn-beijing` | China (Beijing) |
198
+ | `cn-hongkong` | China (Hong Kong) |
199
+ | `ap-southeast-1` | Singapore |
200
+ | `ap-northeast-1` | Japan (Tokyo) |
201
+ | `eu-central-1` | Germany (Frankfurt) |
202
+ | `us-east-1` | US (Virginia) |
203
+
204
+ > **API keys are region-specific.** Each region issues its own API keys (`sk-` prefix) in its Model Studio console, and keys cannot be mixed across regions — using a key from another region fails with `401`. Switch `api_key` together with the region.
205
+
206
+ Region-specific notes:
207
+
208
+ - WebSocket endpoints (`wss://.../api-ws/v1/inference`) are only served in `cn-beijing` and `ap-southeast-1`. `set_region` still sets `base_websocket_api_url` for every region, but WebSocket-based realtime APIs (realtime speech recognition/synthesis, multimodal dialog, etc.) are not available in the other regions.
209
+ - `eu-central-1` / `ap-northeast-1`: the deployment scope (Global, or EU / Japan) is chosen when the workspace is created in the console, not per API call.
210
+ - `us-east-1`: model names with the `-us` suffix (e.g. `qwen-plus-us`) restrict inference to the US; names without the suffix default to global inference.
211
+ - Batch inference, model fine-tuning and application development are currently only available in `cn-beijing` and `ap-southeast-1`.
212
+
213
+ > `set_region` updates process-wide globals, so it is not concurrency-safe when a single process talks to multiple regions at the same time. Call it once at startup, or re-call it before each switch.
214
+
215
+ ### Using environment variables
216
+
217
+ You can also select the region without code:
218
+
219
+ ```shell
220
+ export DASHSCOPE_API_REGION='ap-southeast-1' # default: cn-beijing
221
+ export DASHSCOPE_WORKSPACE_ID='ws-xxx123' # used to resolve the endpoint subdomain
222
+ ```
223
+
224
+ When a MaaS region is set via `DASHSCOPE_API_REGION`, the SDK builds the regional endpoints and substitutes `DASHSCOPE_WORKSPACE_ID` into them. You can also override each base URL directly:
225
+
226
+ | Environment variable | Overrides |
227
+ |----------------------|-----------|
228
+ | `DASHSCOPE_HTTP_BASE_URL` | HTTP endpoint (`dashscope.base_http_api_url`) |
229
+ | `DASHSCOPE_WEBSOCKET_BASE_URL` | WebSocket endpoint (`dashscope.base_websocket_api_url`) |
230
+ | `DASHSCOPE_COMPATIBLE_BASE_URL` | OpenAI-compatible endpoint (`dashscope.base_compatible_api_url`) |
231
+
232
+ `set_region` always builds workspace-exclusive endpoints. Some regions also offer shared domains without a workspace subdomain — `dashscope.aliyuncs.com` (Beijing), `dashscope-intl.aliyuncs.com` (Singapore) and `dashscope-us.aliyuncs.com` (US Virginia); use the override variables above to point at them.
233
+
234
+ ### OpenAI-compatible chat completions
235
+
236
+ The SDK exposes an OpenAI-compatible chat completions entry that talks to `dashscope.base_compatible_api_url` (request path `chat/completions`) — no extra `openai` package required. It follows the region configured above.
237
+
238
+ ```python
239
+ import dashscope
240
+ from dashscope.aigc.chat_completion import Completions
241
+
242
+ dashscope.set_region(region="cn-hongkong", workspace_id="ws-hk-789")
243
+
244
+ response = Completions.create(
245
+ model="qwen-max",
246
+ messages=[{"role": "user", "content": "Hello"}],
247
+ api_key="YOUR-DASHSCOPE-API-KEY",
248
+ stream=False, # set True to get a generator of ChatCompletionChunk
249
+ )
250
+ print(response)
251
+ ```
252
+
253
+ A complete runnable example is available in [`samples/set_region_example.py`](samples/set_region_example.py).
254
+
172
255
  ## AI Assistant: DashScope SDK Expert
173
256
 
174
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.
175
258
 
176
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
177
260
  - 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
261
+ - Full walkthrough: [DashScope SDK Expert guide](https://help.aliyun.com/en/model-studio/dashscope-sdk-expert)
178
262
 
179
263
  ## Supported Models
180
264
 
@@ -52,7 +52,7 @@ else:
52
52
 
53
53
  ## API Key Authentication
54
54
 
55
- The SDK uses API key for authentication. Please refer to [official documentation for alibabacloud china](https://www.alibabacloud.com/help/en/model-studio/) and [official documentation for alibabacloud international](https://www.alibabacloud.com/help/en/model-studio/) regarding how to obtain your api-key.
55
+ The SDK uses API key for authentication. To obtain an API Key, see [How to get an API Key](https://help.aliyun.com/en/model-studio/get-api-key). Please refer to [official documentation for alibabacloud china](https://www.alibabacloud.com/help/en/model-studio/) and [official documentation for alibabacloud international](https://www.alibabacloud.com/help/en/model-studio/) regarding how to obtain your api-key.
56
56
 
57
57
  ### Using the API Key
58
58
 
@@ -89,12 +89,94 @@ save_api_key(api_key='YOUR-DASHSCOPE-API-KEY',
89
89
 
90
90
  ```
91
91
 
92
+ ## Region and Endpoint Configuration
93
+
94
+ By default the SDK sends requests to the China (Beijing) public endpoint `dashscope.aliyuncs.com`. If your Model Studio (Bailian) workspace lives in another region, switch the endpoint before making calls.
95
+
96
+ ### Using `set_region`
97
+
98
+ `dashscope.set_region(region, workspace_id)` points the HTTP, WebSocket and OpenAI-compatible base URLs at the given region in a single call. `workspace_id` is required and is used as the endpoint subdomain.
99
+
100
+ ```python
101
+ import dashscope
102
+
103
+ # Switch to the Singapore region for workspace "ws-xxx123"
104
+ dashscope.set_region(region="ap-southeast-1", workspace_id="ws-xxx123")
105
+
106
+ # All subsequent calls use:
107
+ # https://ws-xxx123.ap-southeast-1.maas.aliyuncs.com/api/v1
108
+ print(dashscope.base_http_api_url)
109
+ ```
110
+
111
+ Supported regions:
112
+
113
+ | Region | Location |
114
+ |--------|----------|
115
+ | `cn-beijing` | China (Beijing) |
116
+ | `cn-hongkong` | China (Hong Kong) |
117
+ | `ap-southeast-1` | Singapore |
118
+ | `ap-northeast-1` | Japan (Tokyo) |
119
+ | `eu-central-1` | Germany (Frankfurt) |
120
+ | `us-east-1` | US (Virginia) |
121
+
122
+ > **API keys are region-specific.** Each region issues its own API keys (`sk-` prefix) in its Model Studio console, and keys cannot be mixed across regions — using a key from another region fails with `401`. Switch `api_key` together with the region.
123
+
124
+ Region-specific notes:
125
+
126
+ - WebSocket endpoints (`wss://.../api-ws/v1/inference`) are only served in `cn-beijing` and `ap-southeast-1`. `set_region` still sets `base_websocket_api_url` for every region, but WebSocket-based realtime APIs (realtime speech recognition/synthesis, multimodal dialog, etc.) are not available in the other regions.
127
+ - `eu-central-1` / `ap-northeast-1`: the deployment scope (Global, or EU / Japan) is chosen when the workspace is created in the console, not per API call.
128
+ - `us-east-1`: model names with the `-us` suffix (e.g. `qwen-plus-us`) restrict inference to the US; names without the suffix default to global inference.
129
+ - Batch inference, model fine-tuning and application development are currently only available in `cn-beijing` and `ap-southeast-1`.
130
+
131
+ > `set_region` updates process-wide globals, so it is not concurrency-safe when a single process talks to multiple regions at the same time. Call it once at startup, or re-call it before each switch.
132
+
133
+ ### Using environment variables
134
+
135
+ You can also select the region without code:
136
+
137
+ ```shell
138
+ export DASHSCOPE_API_REGION='ap-southeast-1' # default: cn-beijing
139
+ export DASHSCOPE_WORKSPACE_ID='ws-xxx123' # used to resolve the endpoint subdomain
140
+ ```
141
+
142
+ When a MaaS region is set via `DASHSCOPE_API_REGION`, the SDK builds the regional endpoints and substitutes `DASHSCOPE_WORKSPACE_ID` into them. You can also override each base URL directly:
143
+
144
+ | Environment variable | Overrides |
145
+ |----------------------|-----------|
146
+ | `DASHSCOPE_HTTP_BASE_URL` | HTTP endpoint (`dashscope.base_http_api_url`) |
147
+ | `DASHSCOPE_WEBSOCKET_BASE_URL` | WebSocket endpoint (`dashscope.base_websocket_api_url`) |
148
+ | `DASHSCOPE_COMPATIBLE_BASE_URL` | OpenAI-compatible endpoint (`dashscope.base_compatible_api_url`) |
149
+
150
+ `set_region` always builds workspace-exclusive endpoints. Some regions also offer shared domains without a workspace subdomain — `dashscope.aliyuncs.com` (Beijing), `dashscope-intl.aliyuncs.com` (Singapore) and `dashscope-us.aliyuncs.com` (US Virginia); use the override variables above to point at them.
151
+
152
+ ### OpenAI-compatible chat completions
153
+
154
+ The SDK exposes an OpenAI-compatible chat completions entry that talks to `dashscope.base_compatible_api_url` (request path `chat/completions`) — no extra `openai` package required. It follows the region configured above.
155
+
156
+ ```python
157
+ import dashscope
158
+ from dashscope.aigc.chat_completion import Completions
159
+
160
+ dashscope.set_region(region="cn-hongkong", workspace_id="ws-hk-789")
161
+
162
+ response = Completions.create(
163
+ model="qwen-max",
164
+ messages=[{"role": "user", "content": "Hello"}],
165
+ api_key="YOUR-DASHSCOPE-API-KEY",
166
+ stream=False, # set True to get a generator of ChatCompletionChunk
167
+ )
168
+ print(response)
169
+ ```
170
+
171
+ A complete runnable example is available in [`samples/set_region_example.py`](samples/set_region_example.py).
172
+
92
173
  ## AI Assistant: DashScope SDK Expert
93
174
 
94
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.
95
176
 
96
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
97
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
179
+ - Full walkthrough: [DashScope SDK Expert guide](https://help.aliyun.com/en/model-studio/dashscope-sdk-expert)
98
180
 
99
181
  ## Supported Models
100
182
 
@@ -34,11 +34,13 @@ from dashscope.api_entities.aio_session import close_shared_aio_session
34
34
  from dashscope.api_entities.http_request import close_shared_sync_session
35
35
  from dashscope.common.api_key import save_api_key
36
36
  from dashscope.common.env import (
37
+ MAAS_REGIONS,
37
38
  api_key,
38
39
  api_key_file_path,
39
40
  base_compatible_api_url,
40
41
  base_http_api_url,
41
42
  base_websocket_api_url,
43
+ validate_workspace_id,
42
44
  )
43
45
  from dashscope.finetune.deployments import Deployments
44
46
  from dashscope.finetune.finetunes import FineTunes
@@ -81,6 +83,50 @@ from dashscope.tokenizers import (
81
83
  list_tokenizers,
82
84
  )
83
85
 
86
+
87
+ # cn-beijing defaults to the legacy dashscope.aliyuncs.com endpoints;
88
+ # its MaaS URLs are only reachable via an explicit set_region() call.
89
+ _MAAS_REGIONS = {*MAAS_REGIONS, "cn-beijing"}
90
+
91
+
92
+ def set_region(region: str, workspace_id: str = None):
93
+ """Switch to a specific MaaS region.
94
+
95
+ Updates base_http_api_url, base_compatible_api_url and
96
+ base_websocket_api_url to point to the MaaS endpoint for the
97
+ given region and workspace.
98
+
99
+ Args:
100
+ region (str): The MaaS region, e.g. "ap-southeast-1",
101
+ "us-east-1", "cn-hongkong", "cn-beijing", "eu-central-1",
102
+ "ap-northeast-1".
103
+ workspace_id (str): The workspace ID, used as the subdomain
104
+ of the MaaS endpoint.
105
+
106
+ Raises:
107
+ ValueError: If region is not supported, workspace_id is
108
+ empty, or workspace_id is not a valid hostname label.
109
+ """
110
+ if region not in _MAAS_REGIONS:
111
+ raise ValueError(
112
+ f"Unsupported region '{region}'. "
113
+ f"Supported regions: {sorted(_MAAS_REGIONS)}",
114
+ )
115
+
116
+ if not workspace_id:
117
+ raise ValueError("workspace_id is required")
118
+
119
+ validate_workspace_id(workspace_id)
120
+
121
+ global base_http_api_url, base_compatible_api_url
122
+ global base_websocket_api_url
123
+
124
+ host = f"{workspace_id}.{region}.maas.aliyuncs.com"
125
+ base_http_api_url = f"https://{host}/api/v1"
126
+ base_compatible_api_url = f"https://{host}/compatible-mode/v1"
127
+ base_websocket_api_url = f"wss://{host}/api-ws/v1/inference"
128
+
129
+
84
130
  __all__ = [
85
131
  "__version__",
86
132
  "base_compatible_api_url",
@@ -141,6 +187,7 @@ __all__ = [
141
187
  "MessageFile",
142
188
  "AssistantFile",
143
189
  "VideoSynthesis",
190
+ "set_region",
144
191
  ]
145
192
 
146
193
  logging.getLogger(__name__).addHandler(NullHandler())
@@ -23,6 +23,7 @@ base_websocket_api_url: str
23
23
  def save_api_key(api_key: str, file_path: Optional[str] = ...) -> None: ...
24
24
  def close_shared_aio_session() -> None: ...
25
25
  def close_shared_sync_session() -> None: ...
26
+ def set_region(region: str, workspace_id: Optional[str] = ...) -> None: ...
26
27
 
27
28
  # ---------------------------------------------------------------------------
28
29
  # Response types
@@ -3,7 +3,7 @@ from __future__ import annotations
3
3
 
4
4
  import uuid
5
5
 
6
- __version__ = "0.6.4"
6
+ __version__ = "0.6.6"
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.