dashscope 2.0.4__tar.gz → 2.1.1__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 (666) hide show
  1. {dashscope-2.0.4 → dashscope-2.1.1}/MANIFEST.in +0 -2
  2. {dashscope-2.0.4/dashscope.egg-info → dashscope-2.1.1}/PKG-INFO +120 -19
  3. dashscope-2.0.4/PKG-INFO → dashscope-2.1.1/README.md +95 -91
  4. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/__init__.py +39 -2
  5. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/__init__.pyi +6 -1
  6. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/_config.py +75 -0
  7. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/_logging.py +23 -0
  8. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/agentstudio/client.py +6 -0
  9. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/agentstudio/resources/sessions.py +45 -3
  10. dashscope-2.1.1/dashscope/applications/agentstudio/resources/usage.py +66 -0
  11. dashscope-2.1.1/dashscope/applications/agentstudio/transport.py +289 -0
  12. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/agentstudio/types/__init__.py +1 -0
  13. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/agentstudio/types/models.py +47 -15
  14. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/agentstudio/types/params.py +9 -3
  15. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/agentic_rl.py +11 -2
  16. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/__init__.py +4 -0
  17. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/common/constants.py +36 -0
  18. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/common/model.py +188 -45
  19. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/common/model_types.py +10 -1
  20. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/common/utils.py +126 -51
  21. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/func_manager.py +11 -4
  22. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/processor/abstract_reward_processor.py +14 -2
  23. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/server/server.py +106 -34
  24. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/app.py +2 -2
  25. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/main.py +8 -6
  26. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/client.py +16 -0
  27. dashscope-2.1.1/dashscope/devkit/__init__.py +75 -0
  28. dashscope-2.1.1/dashscope/devkit/diagnosis.py +536 -0
  29. dashscope-2.1.1/dashscope/devkit/mock.py +910 -0
  30. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/errors.py +128 -6
  31. dashscope-2.1.1/dashscope/expert.py +151 -0
  32. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/aigc/conversation.py +3 -3
  33. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/aigc/image_generation.py +2 -2
  34. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/aigc/image_synthesis.py +2 -2
  35. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/aigc/video_synthesis.py +4 -4
  36. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/audio/asr/recognition.py +3 -3
  37. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/audio/asr/translation_recognizer.py +7 -9
  38. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/audio/http_tts/http_speech_synthesizer.py +1 -1
  39. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/audio/qwen_tts/speech_synthesizer.py +1 -1
  40. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/audio/tts/speech_synthesizer.py +8 -0
  41. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/cli/__init__.py +6 -4
  42. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/files.py +1 -1
  43. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/finetune/deployments.py +1 -1
  44. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/models.py +2 -1
  45. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/threads/messages/messages.py +5 -4
  46. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/threads/runs/runs.py +2 -1
  47. dashscope-2.1.1/dashscope/legacy_1x/tokenizers/tokenizer.py +115 -0
  48. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/protocols/anthropic.py +131 -44
  49. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/protocols/base.py +32 -2
  50. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/protocols/native.py +20 -3
  51. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/protocols/openai.py +79 -27
  52. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/resources/_jobs.py +429 -78
  53. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/resources/_oss_upload.py +5 -2
  54. dashscope-2.1.1/dashscope/resources/_sse.py +124 -0
  55. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/resources/apps.py +356 -26
  56. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/resources/audio/__init__.py +69 -2
  57. dashscope-2.1.1/dashscope/resources/audio/_ws_session.py +292 -0
  58. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/resources/audio/asr.py +289 -7
  59. dashscope-2.1.1/dashscope/resources/audio/customization.py +1470 -0
  60. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/resources/audio/http_tts.py +314 -56
  61. dashscope-2.1.1/dashscope/resources/audio/live.py +735 -0
  62. dashscope-2.1.1/dashscope/resources/audio/phrases.py +580 -0
  63. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/resources/audio/realtime.py +224 -192
  64. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/resources/chat/completions.py +328 -33
  65. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/resources/decision.py +151 -8
  66. dashscope-2.1.1/dashscope/resources/deployments.py +1189 -0
  67. dashscope-2.1.1/dashscope/resources/embeddings.py +1022 -0
  68. dashscope-2.1.1/dashscope/resources/files.py +1011 -0
  69. dashscope-2.1.1/dashscope/resources/fine_tunes.py +1589 -0
  70. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/resources/images.py +577 -21
  71. dashscope-2.1.1/dashscope/resources/models.py +558 -0
  72. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/resources/multimodal/chat.py +172 -9
  73. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/resources/multimodal/embeddings.py +32 -3
  74. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/resources/reinforcement_learning.py +242 -18
  75. dashscope-2.1.1/dashscope/resources/rerank.py +340 -0
  76. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/resources/tingwu.py +175 -26
  77. dashscope-2.1.1/dashscope/resources/tokenization.py +302 -0
  78. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/resources/videos.py +513 -5
  79. dashscope-2.1.1/dashscope/transport/__init__.py +19 -0
  80. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/transport/_ident.py +42 -7
  81. dashscope-2.1.1/dashscope/transport/_options.py +160 -0
  82. dashscope-2.1.1/dashscope/transport/_response.py +209 -0
  83. dashscope-2.1.1/dashscope/transport/http.py +1190 -0
  84. dashscope-2.1.1/dashscope/transport/sse.py +289 -0
  85. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/transport/ws.py +66 -11
  86. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/transport/ws_connection.py +62 -12
  87. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/types/__init__.py +2 -0
  88. dashscope-2.1.1/dashscope/types/_parse.py +513 -0
  89. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/types/common.py +47 -3
  90. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/types/completions.py +97 -24
  91. dashscope-2.1.1/dashscope/types/pagination.py +225 -0
  92. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/version.py +1 -1
  93. dashscope-2.0.4/README.md → dashscope-2.1.1/dashscope.egg-info/PKG-INFO +192 -10
  94. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope.egg-info/SOURCES.txt +30 -146
  95. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope.egg-info/requires.txt +25 -11
  96. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/audio/_common.py +1 -1
  97. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/audio/asr_microphone.py +1 -1
  98. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/audio/direct_call/_common.py +1 -1
  99. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/audio/direct_call/asr_microphone.py +1 -1
  100. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/audio/direct_call/realtime_omni.py +1 -1
  101. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/audio/direct_call/realtime_qwen_audio.py +1 -1
  102. dashscope-2.1.1/examples/01_atomic_capabilities/audio/realtime_live.py +119 -0
  103. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/audio/realtime_omni.py +1 -1
  104. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/audio/realtime_qwen_audio.py +1 -1
  105. {dashscope-2.0.4 → dashscope-2.1.1}/examples/03_agent_recipes/mcp_server_demo/README.md +1 -2
  106. {dashscope-2.0.4 → dashscope-2.1.1}/examples/03_agent_recipes/mcp_server_demo/server.py +2 -3
  107. {dashscope-2.0.4 → dashscope-2.1.1}/examples/README.md +1 -1
  108. {dashscope-2.0.4 → dashscope-2.1.1}/examples/README_zh.md +1 -1
  109. dashscope-2.1.1/pyproject.toml +12 -0
  110. {dashscope-2.0.4 → dashscope-2.1.1}/setup.py +23 -10
  111. dashscope-2.1.1/tests/test_agentic_rl_datasets_upload.py +168 -0
  112. dashscope-2.1.1/tests/test_agentic_rl_fc_errors.py +264 -0
  113. dashscope-2.1.1/tests/test_agentic_rl_review_regressions.py +336 -0
  114. dashscope-2.1.1/tests/test_agentic_rl_script.py +107 -0
  115. dashscope-2.1.1/tests/test_agentic_rl_server_hardening.py +460 -0
  116. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_agentstudio_models.py +101 -0
  117. dashscope-2.1.1/tests/test_agentstudio_usage.py +852 -0
  118. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_audio.py +7 -4
  119. dashscope-2.1.1/tests/test_audio_live_session.py +1975 -0
  120. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_audio_management.py +143 -0
  121. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_audio_samples_direct_call.py +3 -2
  122. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_audio_tts_http.py +476 -0
  123. dashscope-2.1.1/tests/test_audio_tts_realtime.py +1041 -0
  124. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_audio_ws_integration.py +62 -0
  125. dashscope-2.1.1/tests/test_audio_ws_session.py +814 -0
  126. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_config.py +156 -0
  127. dashscope-2.1.1/tests/test_devkit_diagnosis.py +227 -0
  128. dashscope-2.1.1/tests/test_devkit_mock.py +552 -0
  129. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_errors.py +114 -0
  130. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_files_models.py +95 -0
  131. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_images_videos.py +90 -0
  132. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_jobs.py +67 -1
  133. dashscope-2.1.1/tests/test_layer_decoupling.py +277 -0
  134. dashscope-2.1.1/tests/test_logging.py +734 -0
  135. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_multimodal.py +200 -0
  136. dashscope-2.1.1/tests/test_pagination.py +471 -0
  137. dashscope-2.1.1/tests/test_parse_model.py +457 -0
  138. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_protocols.py +176 -1
  139. dashscope-2.1.1/tests/test_request_options.py +503 -0
  140. dashscope-2.1.1/tests/test_resource_request_options.py +1029 -0
  141. dashscope-2.1.1/tests/test_response.py +354 -0
  142. dashscope-2.1.1/tests/test_response_drift.py +1192 -0
  143. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_settings.py +39 -0
  144. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_tools_resources.py +119 -0
  145. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_transport.py +158 -1
  146. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_ws_connection.py +538 -5
  147. dashscope-2.0.4/dashscope/acli/__init__.py +0 -24
  148. dashscope-2.0.4/dashscope/acli/__main__.py +0 -7
  149. dashscope-2.0.4/dashscope/acli/acceptance.py +0 -355
  150. dashscope-2.0.4/dashscope/acli/agent.py +0 -1931
  151. dashscope-2.0.4/dashscope/acli/agents/__init__.py +0 -2
  152. dashscope-2.0.4/dashscope/acli/agents/delegate.py +0 -379
  153. dashscope-2.0.4/dashscope/acli/agents/subagent.py +0 -317
  154. dashscope-2.0.4/dashscope/acli/agents/subagents.py +0 -357
  155. dashscope-2.0.4/dashscope/acli/audit.py +0 -252
  156. dashscope-2.0.4/dashscope/acli/capabilities/__init__.py +0 -102
  157. dashscope-2.0.4/dashscope/acli/capabilities/local_memory.py +0 -92
  158. dashscope-2.0.4/dashscope/acli/cli/__init__.py +0 -250
  159. dashscope-2.0.4/dashscope/acli/cli/completer.py +0 -316
  160. dashscope-2.0.4/dashscope/acli/cli/constants.py +0 -320
  161. dashscope-2.0.4/dashscope/acli/cli/dispatch.py +0 -560
  162. dashscope-2.0.4/dashscope/acli/cli/examples.py +0 -510
  163. dashscope-2.0.4/dashscope/acli/cli/handlers_capability.py +0 -306
  164. dashscope-2.0.4/dashscope/acli/cli/handlers_config.py +0 -850
  165. dashscope-2.0.4/dashscope/acli/cli/handlers_device.py +0 -432
  166. dashscope-2.0.4/dashscope/acli/cli/handlers_key.py +0 -318
  167. dashscope-2.0.4/dashscope/acli/cli/handlers_misc.py +0 -328
  168. dashscope-2.0.4/dashscope/acli/cli/handlers_profile.py +0 -272
  169. dashscope-2.0.4/dashscope/acli/cli/handlers_provider.py +0 -357
  170. dashscope-2.0.4/dashscope/acli/cli/handlers_session.py +0 -213
  171. dashscope-2.0.4/dashscope/acli/cli/handlers_setup.py +0 -311
  172. dashscope-2.0.4/dashscope/acli/cli/handlers_skill.py +0 -373
  173. dashscope-2.0.4/dashscope/acli/cli/mcp.py +0 -179
  174. dashscope-2.0.4/dashscope/acli/cli/multimodal.py +0 -279
  175. dashscope-2.0.4/dashscope/acli/cli/repl.py +0 -617
  176. dashscope-2.0.4/dashscope/acli/cli/runners.py +0 -567
  177. dashscope-2.0.4/dashscope/acli/cli/startup.py +0 -197
  178. dashscope-2.0.4/dashscope/acli/cli/streaming.py +0 -360
  179. dashscope-2.0.4/dashscope/acli/commands.py +0 -237
  180. dashscope-2.0.4/dashscope/acli/compression.py +0 -364
  181. dashscope-2.0.4/dashscope/acli/config.py +0 -906
  182. dashscope-2.0.4/dashscope/acli/debuglog.py +0 -29
  183. dashscope-2.0.4/dashscope/acli/deliverable.py +0 -171
  184. dashscope-2.0.4/dashscope/acli/dev.py +0 -1294
  185. dashscope-2.0.4/dashscope/acli/eval/__init__.py +0 -248
  186. dashscope-2.0.4/dashscope/acli/examples/basic-chat/.acli/config.toml +0 -4
  187. dashscope-2.0.4/dashscope/acli/examples/basic-chat/.acli/custom-extensions.toml +0 -201
  188. dashscope-2.0.4/dashscope/acli/examples/basic-chat/.acli/hooks.toml +0 -101
  189. dashscope-2.0.4/dashscope/acli/examples/basic-chat/.acli/skills/explain-code.md +0 -17
  190. dashscope-2.0.4/dashscope/acli/examples/basic-chat/.acli/skills/research-topic.md +0 -19
  191. dashscope-2.0.4/dashscope/acli/examples/basic-chat/.acli/skills/translate.md +0 -15
  192. dashscope-2.0.4/dashscope/acli/examples/basic-chat/.acli/skills/write-poem.md +0 -11
  193. dashscope-2.0.4/dashscope/acli/examples/basic-chat/.acli/system-prompt.md +0 -26
  194. dashscope-2.0.4/dashscope/acli/examples/basic-chat/README.md +0 -112
  195. dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/config.toml +0 -5
  196. dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/custom-extensions.toml +0 -23
  197. dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/hooks.toml +0 -25
  198. dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/agent.md +0 -161
  199. dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/api-doc.md +0 -19
  200. dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/cli.md +0 -102
  201. dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/diagnose.md +0 -15
  202. dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/error-code.md +0 -77
  203. dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/explain-code.md +0 -9
  204. dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/fine-tuning.md +0 -166
  205. dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/multimodal.md +0 -223
  206. dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/retrieval.md +0 -243
  207. dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/sdk-example.md +0 -20
  208. dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/speech.md +0 -201
  209. dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/text-generation.md +0 -209
  210. dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/translate.md +0 -9
  211. dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/system-prompt.md +0 -116
  212. dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/README.md +0 -117
  213. dashscope-2.0.4/dashscope/acli/executor.py +0 -674
  214. dashscope-2.0.4/dashscope/acli/expert.py +0 -143
  215. dashscope-2.0.4/dashscope/acli/extensions.py +0 -1304
  216. dashscope-2.0.4/dashscope/acli/hooks.py +0 -426
  217. dashscope-2.0.4/dashscope/acli/mcp_server.py +0 -169
  218. dashscope-2.0.4/dashscope/acli/mcp_stdio.py +0 -313
  219. dashscope-2.0.4/dashscope/acli/memory/__init__.py +0 -2
  220. dashscope-2.0.4/dashscope/acli/memory/directives_learning.py +0 -268
  221. dashscope-2.0.4/dashscope/acli/memory/experience.py +0 -175
  222. dashscope-2.0.4/dashscope/acli/memory/manager.py +0 -172
  223. dashscope-2.0.4/dashscope/acli/memory/plan.py +0 -111
  224. dashscope-2.0.4/dashscope/acli/memory/reflection.py +0 -839
  225. dashscope-2.0.4/dashscope/acli/memory/skill_evolution.py +0 -250
  226. dashscope-2.0.4/dashscope/acli/memory/tool_chains.py +0 -198
  227. dashscope-2.0.4/dashscope/acli/memory/trace.py +0 -208
  228. dashscope-2.0.4/dashscope/acli/permission.py +0 -141
  229. dashscope-2.0.4/dashscope/acli/platforms/__init__.py +0 -74
  230. dashscope-2.0.4/dashscope/acli/platforms/bailian/__init__.py +0 -15
  231. dashscope-2.0.4/dashscope/acli/platforms/bailian/cli.py +0 -178
  232. dashscope-2.0.4/dashscope/acli/platforms/bailian/mcp.py +0 -303
  233. dashscope-2.0.4/dashscope/acli/platforms/base.py +0 -309
  234. dashscope-2.0.4/dashscope/acli/platforms/local/__init__.py +0 -6
  235. dashscope-2.0.4/dashscope/acli/platforms/local/history.py +0 -319
  236. dashscope-2.0.4/dashscope/acli/platforms/local/memory.py +0 -235
  237. dashscope-2.0.4/dashscope/acli/prompt.py +0 -202
  238. dashscope-2.0.4/dashscope/acli/prompt_pipeline.py +0 -316
  239. dashscope-2.0.4/dashscope/acli/providers/__init__.py +0 -156
  240. dashscope-2.0.4/dashscope/acli/providers/adapter.py +0 -331
  241. dashscope-2.0.4/dashscope/acli/providers/anthropic.py +0 -397
  242. dashscope-2.0.4/dashscope/acli/providers/base.py +0 -49
  243. dashscope-2.0.4/dashscope/acli/providers/hardening.py +0 -302
  244. dashscope-2.0.4/dashscope/acli/providers/openai.py +0 -282
  245. dashscope-2.0.4/dashscope/acli/providers/profile.py +0 -307
  246. dashscope-2.0.4/dashscope/acli/providers/tongyi.py +0 -823
  247. dashscope-2.0.4/dashscope/acli/runtime.py +0 -115
  248. dashscope-2.0.4/dashscope/acli/sandbox.py +0 -181
  249. dashscope-2.0.4/dashscope/acli/scheduler.py +0 -643
  250. dashscope-2.0.4/dashscope/acli/sdk.py +0 -217
  251. dashscope-2.0.4/dashscope/acli/session.py +0 -566
  252. dashscope-2.0.4/dashscope/acli/session_events.py +0 -261
  253. dashscope-2.0.4/dashscope/acli/skills/__init__.py +0 -35
  254. dashscope-2.0.4/dashscope/acli/skills/base.py +0 -271
  255. dashscope-2.0.4/dashscope/acli/skills/manager.py +0 -175
  256. dashscope-2.0.4/dashscope/acli/skills/package.py +0 -253
  257. dashscope-2.0.4/dashscope/acli/skills/store.py +0 -589
  258. dashscope-2.0.4/dashscope/acli/tools/__init__.py +0 -6
  259. dashscope-2.0.4/dashscope/acli/tools/browser.py +0 -494
  260. dashscope-2.0.4/dashscope/acli/tools/camera.py +0 -39
  261. dashscope-2.0.4/dashscope/acli/tools/checkpoint.py +0 -220
  262. dashscope-2.0.4/dashscope/acli/tools/evolution.py +0 -83
  263. dashscope-2.0.4/dashscope/acli/tools/filesystem.py +0 -437
  264. dashscope-2.0.4/dashscope/acli/tools/platform.py +0 -555
  265. dashscope-2.0.4/dashscope/acli/tools/registry.py +0 -497
  266. dashscope-2.0.4/dashscope/acli/tools/session.py +0 -412
  267. dashscope-2.0.4/dashscope/acli/tools/shell.py +0 -950
  268. dashscope-2.0.4/dashscope/acli/tools/skills.py +0 -80
  269. dashscope-2.0.4/dashscope/acli/tools/vision.py +0 -674
  270. dashscope-2.0.4/dashscope/acli/tools/web_search.py +0 -193
  271. dashscope-2.0.4/dashscope/acli/ui/__init__.py +0 -2
  272. dashscope-2.0.4/dashscope/acli/ui/camera.py +0 -208
  273. dashscope-2.0.4/dashscope/acli/ui/embedded.py +0 -131
  274. dashscope-2.0.4/dashscope/acli/ui/tts.py +0 -662
  275. dashscope-2.0.4/dashscope/acli/ui/tui.py +0 -3182
  276. dashscope-2.0.4/dashscope/acli/ui/voice.py +0 -483
  277. dashscope-2.0.4/dashscope/acli/utils/__init__.py +0 -98
  278. dashscope-2.0.4/dashscope/acli/utils/clipboard.py +0 -43
  279. dashscope-2.0.4/dashscope/acli/utils/crypto.py +0 -67
  280. dashscope-2.0.4/dashscope/acli/utils/exceptions.py +0 -19
  281. dashscope-2.0.4/dashscope/acli/utils/ids.py +0 -37
  282. dashscope-2.0.4/dashscope/acli/utils/images.py +0 -31
  283. dashscope-2.0.4/dashscope/acli/utils/keywords.py +0 -52
  284. dashscope-2.0.4/dashscope/acli/utils/messages.py +0 -200
  285. dashscope-2.0.4/dashscope/acli/utils/paths.py +0 -142
  286. dashscope-2.0.4/dashscope/acli/utils/sanitizer.py +0 -104
  287. dashscope-2.0.4/dashscope/acli/utils/spinner.py +0 -108
  288. dashscope-2.0.4/dashscope/acli/utils/template.py +0 -31
  289. dashscope-2.0.4/dashscope/acli/utils/text.py +0 -140
  290. dashscope-2.0.4/dashscope/acli/utils/toml.py +0 -111
  291. dashscope-2.0.4/dashscope/acli/utils/validation.py +0 -116
  292. dashscope-2.0.4/dashscope/applications/agentstudio/transport.py +0 -710
  293. dashscope-2.0.4/dashscope/legacy_1x/tokenizers/qwen.tiktoken +0 -151643
  294. dashscope-2.0.4/dashscope/legacy_1x/tokenizers/tokenizer.py +0 -44
  295. dashscope-2.0.4/dashscope/resources/_sse.py +0 -78
  296. dashscope-2.0.4/dashscope/resources/audio/customization.py +0 -615
  297. dashscope-2.0.4/dashscope/resources/audio/phrases.py +0 -254
  298. dashscope-2.0.4/dashscope/resources/deployments.py +0 -455
  299. dashscope-2.0.4/dashscope/resources/embeddings.py +0 -429
  300. dashscope-2.0.4/dashscope/resources/files.py +0 -400
  301. dashscope-2.0.4/dashscope/resources/fine_tunes.py +0 -698
  302. dashscope-2.0.4/dashscope/resources/models.py +0 -229
  303. dashscope-2.0.4/dashscope/resources/rerank.py +0 -168
  304. dashscope-2.0.4/dashscope/resources/tokenization.py +0 -142
  305. dashscope-2.0.4/dashscope/transport/__init__.py +0 -11
  306. dashscope-2.0.4/dashscope/transport/http.py +0 -641
  307. dashscope-2.0.4/dashscope/transport/sse.py +0 -156
  308. dashscope-2.0.4/tests/test_audio_tts_realtime.py +0 -509
  309. dashscope-2.0.4/tests/test_logging.py +0 -199
  310. {dashscope-2.0.4 → dashscope-2.1.1}/LICENSE +0 -0
  311. {dashscope-2.0.4 → dashscope-2.1.1}/LICENSE.certifi +0 -0
  312. {dashscope-2.0.4 → dashscope-2.1.1}/NOTICE +0 -0
  313. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/_error_registry.py +0 -0
  314. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/_quickstart.py +0 -0
  315. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/_shared/__init__.py +0 -0
  316. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/_shared/_errors.py +0 -0
  317. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/_shared/_sdk_ident.py +0 -0
  318. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/_shared/_sdk_session.py +0 -0
  319. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/_shared/_validation.py +0 -0
  320. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/__init__.py +0 -0
  321. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/agentstudio/__init__.py +0 -0
  322. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/agentstudio/constants.py +0 -0
  323. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/agentstudio/exceptions.py +0 -0
  324. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/agentstudio/pagination.py +0 -0
  325. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/agentstudio/resources/__init__.py +0 -0
  326. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/agentstudio/resources/_helpers.py +0 -0
  327. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/agentstudio/resources/agents.py +0 -0
  328. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/agentstudio/resources/deployments.py +0 -0
  329. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/agentstudio/resources/environments.py +0 -0
  330. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/agentstudio/resources/files.py +0 -0
  331. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/agentstudio/resources/memory_stores.py +0 -0
  332. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/agentstudio/resources/security.py +0 -0
  333. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/agentstudio/resources/session_events.py +0 -0
  334. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/agentstudio/resources/session_resources.py +0 -0
  335. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/agentstudio/resources/session_threads.py +0 -0
  336. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/agentstudio/resources/skills.py +0 -0
  337. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/agentstudio/resources/vaults.py +0 -0
  338. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/agentstudio/resources/webhook_endpoints.py +0 -0
  339. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/agentstudio/streaming.py +0 -0
  340. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/__init__.py +0 -0
  341. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/_submit.py +0 -0
  342. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/common/__init__.py +0 -0
  343. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/common/_legacy_errors.py +0 -0
  344. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/common/errors.py +0 -0
  345. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/common/log.py +0 -0
  346. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/__init__.py +0 -0
  347. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/data/__init__.py +0 -0
  348. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/data/base_data_model.py +0 -0
  349. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/data/group_reward_input.py +0 -0
  350. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/data/group_reward_output.py +0 -0
  351. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/data/reward_input.py +0 -0
  352. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/data/reward_output.py +0 -0
  353. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/data/rollout_input.py +0 -0
  354. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/data/rollout_output.py +0 -0
  355. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/demo/__init__.py +0 -0
  356. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/demo/group_reward_processor_demo.py +0 -0
  357. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/demo/reward_processor_demo.py +0 -0
  358. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/demo/rollout_processor_demo.py +0 -0
  359. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/func_decorator.py +0 -0
  360. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/observability/__init__.py +0 -0
  361. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/observability/genai/__init__.py +0 -0
  362. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/observability/genai/_core.py +0 -0
  363. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/observability/genai/llm_dashscope.py +0 -0
  364. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/observability/genai/llm_openai.py +0 -0
  365. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/observability/genai/llm_span.py +0 -0
  366. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/observability/genai/messages.py +0 -0
  367. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/observability/genai/tools.py +0 -0
  368. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/observability/processor_span.py +0 -0
  369. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/observability/tracing.py +0 -0
  370. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/parser/__init__.py +0 -0
  371. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/parser/base_parser.py +0 -0
  372. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/parser/group_reward_parser.py +0 -0
  373. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/parser/reward_parser.py +0 -0
  374. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/parser/rollout_parser.py +0 -0
  375. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/processor/__init__.py +0 -0
  376. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/processor/abstract_group_reward_processor.py +0 -0
  377. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/processor/abstract_processor.py +0 -0
  378. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/processor/abstract_rollout_processor.py +0 -0
  379. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/applications/finetune/reinforcement/component/server/__init__.py +0 -0
  380. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/__init__.py +0 -0
  381. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/__main__.py +0 -0
  382. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/commands/__init__.py +0 -0
  383. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/commands/agentstudio.py +0 -0
  384. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/commands/apps.py +0 -0
  385. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/commands/audio.py +0 -0
  386. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/commands/audio_customization.py +0 -0
  387. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/commands/auth.py +0 -0
  388. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/commands/chat.py +0 -0
  389. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/commands/config.py +0 -0
  390. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/commands/decision.py +0 -0
  391. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/commands/deployments.py +0 -0
  392. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/commands/embeddings.py +0 -0
  393. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/commands/files.py +0 -0
  394. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/commands/ft.py +0 -0
  395. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/commands/images.py +0 -0
  396. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/commands/models.py +0 -0
  397. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/commands/multimodal.py +0 -0
  398. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/commands/oss.py +0 -0
  399. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/commands/rerank.py +0 -0
  400. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/commands/rl.py +0 -0
  401. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/commands/tingwu.py +0 -0
  402. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/commands/tokenization.py +0 -0
  403. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/commands/videos.py +0 -0
  404. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/config_store.py +0 -0
  405. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/confirm.py +0 -0
  406. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/context.py +0 -0
  407. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/errors.py +0 -0
  408. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/input.py +0 -0
  409. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/output.py +0 -0
  410. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/progress.py +0 -0
  411. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/cli/sdk.py +0 -0
  412. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/__init__.py +0 -0
  413. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/_shim.py +0 -0
  414. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/agentstudio/__init__.py +0 -0
  415. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/agentstudio/client.py +0 -0
  416. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/agentstudio/exceptions.py +0 -0
  417. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/agentstudio/streaming.py +0 -0
  418. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/agentstudio/transport.py +0 -0
  419. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/aigc/__init__.py +0 -0
  420. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/aigc/chat_completion.py +0 -0
  421. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/aigc/code_generation.py +0 -0
  422. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/aigc/generation.py +0 -0
  423. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/aigc/multimodal_conversation.py +0 -0
  424. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/api_entities/__init__.py +0 -0
  425. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/api_entities/aio_session.py +0 -0
  426. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/api_entities/aiohttp_request.py +0 -0
  427. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/api_entities/api_request_data.py +0 -0
  428. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/api_entities/api_request_factory.py +0 -0
  429. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/api_entities/base_request.py +0 -0
  430. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/api_entities/chat_completion_types.py +0 -0
  431. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/api_entities/dashscope_response.py +0 -0
  432. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/api_entities/encryption.py +0 -0
  433. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/api_entities/http_request.py +0 -0
  434. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/api_entities/websocket_request.py +0 -0
  435. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/app/__init__.py +0 -0
  436. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/app/application.py +0 -0
  437. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/app/application_response.py +0 -0
  438. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/assistants/__init__.py +0 -0
  439. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/assistants/assistant_types.py +0 -0
  440. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/assistants/assistants.py +0 -0
  441. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/assistants/files.py +0 -0
  442. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/audio/__init__.py +0 -0
  443. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/audio/asr/__init__.py +0 -0
  444. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/audio/asr/asr_phrase_manager.py +0 -0
  445. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/audio/asr/transcription.py +0 -0
  446. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/audio/asr/vocabulary.py +0 -0
  447. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/audio/http_tts/__init__.py +0 -0
  448. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/audio/qwen_asr/__init__.py +0 -0
  449. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/audio/qwen_asr/qwen_transcription.py +0 -0
  450. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/audio/qwen_omni/__init__.py +0 -0
  451. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/audio/qwen_omni/omni_realtime.py +0 -0
  452. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/audio/qwen_tts/__init__.py +0 -0
  453. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/audio/qwen_tts_realtime/__init__.py +0 -0
  454. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/audio/qwen_tts_realtime/qwen_tts_realtime.py +0 -0
  455. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/audio/tts/__init__.py +0 -0
  456. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/audio/tts_v2/__init__.py +0 -0
  457. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/audio/tts_v2/enrollment.py +0 -0
  458. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/audio/tts_v2/speech_synthesizer.py +0 -0
  459. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/cli/__main__.py +0 -0
  460. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/cli/agentic_rl.py +0 -0
  461. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/cli/application.py +0 -0
  462. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/cli/auth.py +0 -0
  463. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/cli/code_generation.py +0 -0
  464. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/cli/common.py +0 -0
  465. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/cli/deployments.py +0 -0
  466. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/cli/embeddings.py +0 -0
  467. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/cli/files.py +0 -0
  468. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/cli/fine_tunes.py +0 -0
  469. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/cli/generation.py +0 -0
  470. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/cli/image_generation.py +0 -0
  471. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/cli/image_synthesis.py +0 -0
  472. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/cli/models.py +0 -0
  473. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/cli/multimodal_conversation.py +0 -0
  474. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/cli/multimodal_embedding.py +0 -0
  475. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/cli/oss.py +0 -0
  476. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/cli/rerank.py +0 -0
  477. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/cli/speech_synthesis.py +0 -0
  478. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/cli/tokenization.py +0 -0
  479. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/cli/transcription.py +0 -0
  480. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/cli/understanding.py +0 -0
  481. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/cli/video_synthesis.py +0 -0
  482. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/client/__init__.py +0 -0
  483. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/client/base_api.py +0 -0
  484. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/common/__init__.py +0 -0
  485. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/common/_sdk_session.py +0 -0
  486. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/common/api_key.py +0 -0
  487. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/common/base_type.py +0 -0
  488. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/common/constants.py +0 -0
  489. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/common/env.py +0 -0
  490. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/common/error.py +0 -0
  491. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/common/logging.py +0 -0
  492. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/common/message_manager.py +0 -0
  493. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/common/utils.py +0 -0
  494. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/embeddings/__init__.py +0 -0
  495. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/embeddings/batch_text_embedding.py +0 -0
  496. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/embeddings/batch_text_embedding_response.py +0 -0
  497. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/embeddings/multimodal_embedding.py +0 -0
  498. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/embeddings/text_embedding.py +0 -0
  499. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/finetune/__init__.py +0 -0
  500. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/finetune/agentic_rl.py +0 -0
  501. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/finetune/customize_types.py +0 -0
  502. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/finetune/finetunes.py +0 -0
  503. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/finetune/reinforcement/__init__.py +0 -0
  504. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/finetune/reinforcement/common/__init__.py +0 -0
  505. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/finetune/reinforcement/common/errors.py +0 -0
  506. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/io/__init__.py +0 -0
  507. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/io/input_output.py +0 -0
  508. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/model.py +0 -0
  509. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/multimodal/__init__.py +0 -0
  510. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/multimodal/dialog_state.py +0 -0
  511. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/multimodal/multimodal_constants.py +0 -0
  512. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/multimodal/multimodal_dialog.py +0 -0
  513. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/multimodal/multimodal_request_params.py +0 -0
  514. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/multimodal/tingwu/__init__.py +0 -0
  515. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/multimodal/tingwu/tingwu.py +0 -0
  516. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/multimodal/tingwu/tingwu_realtime.py +0 -0
  517. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/nlp/__init__.py +0 -0
  518. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/nlp/understanding.py +0 -0
  519. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/protocol/__init__.py +0 -0
  520. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/protocol/websocket.py +0 -0
  521. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/rerank/__init__.py +0 -0
  522. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/rerank/text_rerank.py +0 -0
  523. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/threads/__init__.py +0 -0
  524. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/threads/messages/__init__.py +0 -0
  525. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/threads/messages/files.py +0 -0
  526. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/threads/runs/__init__.py +0 -0
  527. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/threads/runs/steps.py +0 -0
  528. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/threads/thread_types.py +0 -0
  529. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/threads/threads.py +0 -0
  530. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/tokenizers/__init__.py +0 -0
  531. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/tokenizers/qwen_tokenizer.py +0 -0
  532. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/tokenizers/tokenization.py +0 -0
  533. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/tokenizers/tokenizer_base.py +0 -0
  534. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/utils/__init__.py +0 -0
  535. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/utils/message_utils.py +0 -0
  536. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/utils/oss_utils.py +0 -0
  537. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/legacy_1x/utils/param_utils.py +0 -0
  538. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/protocols/__init__.py +0 -0
  539. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/py.typed +0 -0
  540. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/resources/__init__.py +0 -0
  541. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/resources/_blocking.py +0 -0
  542. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/resources/_oss.py +0 -0
  543. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/resources/audio/_callbacks.py +0 -0
  544. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/resources/audio/tts.py +0 -0
  545. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/resources/chat/__init__.py +0 -0
  546. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/resources/chat/_params.py +0 -0
  547. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/resources/multimodal/__init__.py +0 -0
  548. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/transport/_retry.py +0 -0
  549. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope/types/messages.py +0 -0
  550. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope.egg-info/dependency_links.txt +0 -0
  551. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope.egg-info/entry_points.txt +0 -0
  552. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope.egg-info/not-zip-safe +0 -0
  553. {dashscope-2.0.4 → dashscope-2.1.1}/dashscope.egg-info/top_level.txt +0 -0
  554. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/applications/apps.py +0 -0
  555. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/audio/README.md +0 -0
  556. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/audio/asr_file.py +0 -0
  557. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/audio/asr_http_stream.py +0 -0
  558. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/audio/asr_websocket.py +0 -0
  559. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/audio/connection_reuse.py +0 -0
  560. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/audio/direct_call/asr_file.py +0 -0
  561. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/audio/direct_call/asr_http_stream.py +0 -0
  562. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/audio/direct_call/asr_websocket.py +0 -0
  563. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/audio/direct_call/connection_reuse.py +0 -0
  564. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/audio/direct_call/realtime_translation.py +0 -0
  565. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/audio/direct_call/tts_http.py +0 -0
  566. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/audio/direct_call/tts_http_stream.py +0 -0
  567. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/audio/direct_call/tts_websocket.py +0 -0
  568. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/audio/direct_call/voice_clone.py +0 -0
  569. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/audio/realtime_translation.py +0 -0
  570. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/audio/tingwu.py +0 -0
  571. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/audio/tts_http.py +0 -0
  572. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/audio/tts_http_stream.py +0 -0
  573. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/audio/tts_websocket.py +0 -0
  574. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/audio/voice_clone.py +0 -0
  575. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/decision/decision.py +0 -0
  576. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/embeddings/embeddings.py +0 -0
  577. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/files/files.py +0 -0
  578. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/fine_tuning/fine_tunes.py +0 -0
  579. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/fine_tuning/reinforcement_learning.py +0 -0
  580. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/image_video_synthesis/images.py +0 -0
  581. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/image_video_synthesis/videos.py +0 -0
  582. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/models/models.py +0 -0
  583. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/multimodal_vision/multimodal_chat.py +0 -0
  584. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/rerank/rerank.py +0 -0
  585. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/text_generation/chat.py +0 -0
  586. {dashscope-2.0.4 → dashscope-2.1.1}/examples/01_atomic_capabilities/text_generation/tokenization.py +0 -0
  587. {dashscope-2.0.4 → dashscope-2.1.1}/examples/02_advanced_engineering/circuit_breaker_retry.py +0 -0
  588. {dashscope-2.0.4 → dashscope-2.1.1}/examples/02_advanced_engineering/client_side_cache.py +0 -0
  589. {dashscope-2.0.4 → dashscope-2.1.1}/examples/02_advanced_engineering/local_mock_debugging.py +0 -0
  590. {dashscope-2.0.4 → dashscope-2.1.1}/examples/03_agent_recipes/agentstudio.py +0 -0
  591. {dashscope-2.0.4 → dashscope-2.1.1}/examples/03_agent_recipes/agentstudio_deployments.py +0 -0
  592. {dashscope-2.0.4 → dashscope-2.1.1}/examples/03_agent_recipes/mcp_server_demo/client_demo.py +0 -0
  593. {dashscope-2.0.4 → dashscope-2.1.1}/examples/03_agent_recipes/rag_expert_system.py +0 -0
  594. {dashscope-2.0.4 → dashscope-2.1.1}/examples/03_agent_recipes/tool_call_loop.py +0 -0
  595. {dashscope-2.0.4 → dashscope-2.1.1}/examples/04_real_world_scenarios/README.md +0 -0
  596. {dashscope-2.0.4 → dashscope-2.1.1}/examples/04_real_world_scenarios/README_zh.md +0 -0
  597. {dashscope-2.0.4 → dashscope-2.1.1}/examples/04_real_world_scenarios/customer_service_assistant.py +0 -0
  598. {dashscope-2.0.4 → dashscope-2.1.1}/examples/04_real_world_scenarios/production_ready_rag_harness.py +0 -0
  599. {dashscope-2.0.4 → dashscope-2.1.1}/examples/04_real_world_scenarios/realtime_audio_meeting_harness.py +0 -0
  600. {dashscope-2.0.4 → dashscope-2.1.1}/examples/04_real_world_scenarios/ticket_triage_harness.py +0 -0
  601. {dashscope-2.0.4 → dashscope-2.1.1}/examples/05_cli/cli_ci_harness.py +0 -0
  602. {dashscope-2.0.4 → dashscope-2.1.1}/examples/05_cli/cli_output_and_errors.py +0 -0
  603. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/aio_generation/basic.py +0 -0
  604. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/aio_generation/custom_session.py +0 -0
  605. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/aio_generation/deep_research.py +0 -0
  606. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/aio_generation/reasoning.py +0 -0
  607. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/aio_generation/tool_calls.py +0 -0
  608. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/aio_image_synthesis.py +0 -0
  609. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/aio_multimodal_conversation/asr.py +0 -0
  610. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/aio_multimodal_conversation/image.py +0 -0
  611. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/aio_multimodal_conversation/ocr.py +0 -0
  612. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/aio_multimodal_conversation/tool_calls.py +0 -0
  613. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/aio_video_synthesis.py +0 -0
  614. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/application.py +0 -0
  615. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/assistant_api.py +0 -0
  616. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/assistant_api_file.py +0 -0
  617. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/assistant_api_simple.py +0 -0
  618. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/cv_models.py +0 -0
  619. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/generation/basic.py +0 -0
  620. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/generation/custom_session.py +0 -0
  621. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/generation/deep_research.py +0 -0
  622. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/generation/reasoning.py +0 -0
  623. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/generation/tool_calls.py +0 -0
  624. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/image_generation.py +0 -0
  625. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/image_synthesis.py +0 -0
  626. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/multimodal_conversation/asr.py +0 -0
  627. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/multimodal_conversation/image.py +0 -0
  628. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/multimodal_conversation/ocr.py +0 -0
  629. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/multimodal_conversation/reasoning.py +0 -0
  630. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/multimodal_conversation/tool_calls.py +0 -0
  631. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/multimodal_conversation/video.py +0 -0
  632. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/multimodal_embedding.py +0 -0
  633. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/qwen_asr.py +0 -0
  634. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/qwen_tts.py +0 -0
  635. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/set_region_example.py +0 -0
  636. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/text_rerank.py +0 -0
  637. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/tingwu_realtime.py +0 -0
  638. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/tingwu_usages.py +0 -0
  639. {dashscope-2.0.4 → dashscope-2.1.1}/examples/legacy_1x/video_synthesis.py +0 -0
  640. {dashscope-2.0.4 → dashscope-2.1.1}/requirements.txt +0 -0
  641. {dashscope-2.0.4 → dashscope-2.1.1}/setup.cfg +0 -0
  642. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_agentstudio_errors.py +0 -0
  643. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_agentstudio_protocol.py +0 -0
  644. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_agentstudio_shim.py +0 -0
  645. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_apps.py +0 -0
  646. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_audio_connection.py +0 -0
  647. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_audio_omni_session.py +0 -0
  648. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_audio_samples.py +0 -0
  649. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_audio_tts_session.py +0 -0
  650. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_base_url_routing.py +0 -0
  651. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_chat.py +0 -0
  652. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_chat_params.py +0 -0
  653. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_decision.py +0 -0
  654. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_error_registry.py +0 -0
  655. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_finetune_deployments.py +0 -0
  656. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_finetune_rl_shim.py +0 -0
  657. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_http_pool.py +0 -0
  658. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_legacy_import_aliases.py +0 -0
  659. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_oss_upload.py +0 -0
  660. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_package_root.py +0 -0
  661. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_rl.py +0 -0
  662. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_sse.py +0 -0
  663. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_sse_comprehensive_verify.py +0 -0
  664. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_tingwu.py +0 -0
  665. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_types_messages.py +0 -0
  666. {dashscope-2.0.4 → dashscope-2.1.1}/tests/test_user_agent_suffix.py +0 -0
@@ -1,8 +1,6 @@
1
- include dashscope/legacy_1x/tokenizers/qwen.tiktoken
2
1
  include dashscope/py.typed
3
2
  include dashscope/__init__.pyi
4
3
  include NOTICE
5
4
  include LICENSE.certifi
6
- recursive-include dashscope/acli/examples *.md *.toml *.py
7
5
  recursive-include examples *.md *.py
8
6
  include requirements.txt
@@ -1,11 +1,14 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dashscope
3
- Version: 2.0.4
3
+ Version: 2.1.1
4
4
  Summary: dashscope client sdk library
5
5
  Home-page: https://dashscope.aliyun.com/
6
6
  Author: Alibaba Cloud
7
7
  Author-email: dashscope@alibabacloud.com
8
8
  License: Apache 2.0
9
+ Project-URL: Documentation, https://dashscope.github.io/dashscope-sdk-python/
10
+ Project-URL: Source, https://github.com/dashscope/dashscope-sdk-python
11
+ Project-URL: Issues, https://github.com/dashscope/dashscope-sdk-python/issues
9
12
  Platform: Posix; MacOS X; Windows
10
13
  Classifier: Development Status :: 4 - Beta
11
14
  Classifier: Intended Audience :: Developers
@@ -41,11 +44,26 @@ Requires-Dist: PyYAML>=6.0
41
44
  Requires-Dist: fastapi>=0.100
42
45
  Requires-Dist: uvicorn>=0.20
43
46
  Requires-Dist: opentelemetry-sdk>=1.20
47
+ Provides-Extra: expert
48
+ Requires-Dist: dashscope-agenticx[tui]<2,>=1.0.0; extra == "expert"
49
+ Provides-Extra: expert-anthropic
50
+ Requires-Dist: anthropic<2,>=0.40; extra == "expert-anthropic"
51
+ Provides-Extra: expert-openai
52
+ Requires-Dist: openai<4,>=1.30; extra == "expert-openai"
53
+ Provides-Extra: expert-voice
54
+ Requires-Dist: sounddevice>=0.4; extra == "expert-voice"
55
+ Requires-Dist: numpy>=1.20; extra == "expert-voice"
56
+ Provides-Extra: expert-camera
57
+ Requires-Dist: opencv-python-headless>=4.5; extra == "expert-camera"
58
+ Provides-Extra: expert-all
59
+ Requires-Dist: dashscope-agenticx[tui]<2,>=1.0.0; extra == "expert-all"
60
+ Requires-Dist: anthropic<2,>=0.40; extra == "expert-all"
61
+ Requires-Dist: openai<4,>=1.30; extra == "expert-all"
62
+ Requires-Dist: sounddevice>=0.4; extra == "expert-all"
63
+ Requires-Dist: numpy>=1.20; extra == "expert-all"
64
+ Requires-Dist: opencv-python-headless>=4.5; extra == "expert-all"
44
65
  Provides-Extra: acli
45
- Requires-Dist: prompt-toolkit>=3.0; extra == "acli"
46
- Requires-Dist: textual<9,>=0.50; extra == "acli"
47
- Requires-Dist: PyYAML>=6.0; extra == "acli"
48
- Requires-Dist: tomli>=2.0; python_version < "3.11" and extra == "acli"
66
+ Requires-Dist: dashscope-agenticx[tui]<2,>=1.0.0; extra == "acli"
49
67
  Provides-Extra: acli-anthropic
50
68
  Requires-Dist: anthropic<2,>=0.40; extra == "acli-anthropic"
51
69
  Provides-Extra: acli-openai
@@ -56,10 +74,7 @@ Requires-Dist: numpy>=1.20; extra == "acli-voice"
56
74
  Provides-Extra: acli-camera
57
75
  Requires-Dist: opencv-python-headless>=4.5; extra == "acli-camera"
58
76
  Provides-Extra: acli-all
59
- Requires-Dist: prompt-toolkit>=3.0; extra == "acli-all"
60
- Requires-Dist: textual<9,>=0.50; extra == "acli-all"
61
- Requires-Dist: PyYAML>=6.0; extra == "acli-all"
62
- Requires-Dist: tomli>=2.0; python_version < "3.11" and extra == "acli-all"
77
+ Requires-Dist: dashscope-agenticx[tui]<2,>=1.0.0; extra == "acli-all"
63
78
  Requires-Dist: anthropic<2,>=0.40; extra == "acli-all"
64
79
  Requires-Dist: openai<4,>=1.30; extra == "acli-all"
65
80
  Requires-Dist: sounddevice>=0.4; extra == "acli-all"
@@ -74,6 +89,7 @@ Dynamic: home-page
74
89
  Dynamic: license
75
90
  Dynamic: license-file
76
91
  Dynamic: platform
92
+ Dynamic: project-url
77
93
  Dynamic: provides-extra
78
94
  Dynamic: requires-dist
79
95
  Dynamic: requires-python
@@ -83,6 +99,8 @@ Dynamic: summary
83
99
 
84
100
  > **English** | [中文](README_zh.md)
85
101
 
102
+ **Documentation**: [dashscope.github.io/dashscope-sdk-python](https://dashscope.github.io/dashscope-sdk-python/) — [中文文档](https://dashscope.github.io/dashscope-sdk-python/zh/)
103
+
86
104
  The DashScope Python SDK is the official client for [Alibaba Cloud Model Studio (Bailian)](https://www.alibabacloud.com/help/en/model-studio/), covering text generation, multi-modal understanding, embeddings, reranking, image/video generation, speech synthesis & recognition, fine-tuning, agentic RL, applications and more.
87
105
 
88
106
  **Version 2.0** introduces a resource-style client — `dashscope.Client()` — modeled on the ergonomics of the OpenAI SDK: one client holds a shared connection pool, every capability hangs off it as a typed resource (`client.chat`, `client.images`, `client.audio`, …), responses are typed objects instead of raw dicts, and failures raise exceptions by default. The complete 1.x public surface remains available at its historical import paths and is implemented by facades under `dashscope.legacy_1x`; AgentStudio and Agentic RL share their large business cores with 2.0 without sharing public return or error contracts.
@@ -107,16 +125,18 @@ The DashScope Python SDK is the official client for [Alibaba Cloud Model Studio
107
125
  pip install -U dashscope
108
126
  ```
109
127
 
110
- The base install covers SDK API calls, the `dashscope` CLI command, Agentic RL fine-tuning and the local tokenizer. Python 3.9+ is required. Optional feature groups all belong to the bundled AI assistant:
128
+ The base install covers SDK API calls, the `dashscope` CLI command, Agentic RL fine-tuning and the local tokenizer. Python 3.9+ is required. Optional feature groups configure the AI assistant provided by `dashscope-agenticx`; the assistant requires Python 3.10+:
111
129
 
112
130
  | Extra | Provides | Install |
113
131
  |-------|----------|---------|
114
- | `acli` | Interactive AI assistant (DashScope SDK Expert) | `pip install "dashscope[acli]"` |
115
- | `acli-openai` | Run the assistant on an OpenAI-compatible model provider | `pip install "dashscope[acli-openai]"` |
116
- | `acli-anthropic` | Run the assistant on an Anthropic model provider | `pip install "dashscope[acli-anthropic]"` |
117
- | `acli-voice` | Voice input and spoken replies in the assistant | `pip install "dashscope[acli-voice]"` |
118
- | `acli-camera` | Camera capture for image input in the assistant | `pip install "dashscope[acli-camera]"` |
119
- | `acli-all` | All of the above (includes `acli`) | `pip install "dashscope[acli-all]"` |
132
+ | `expert` | Interactive AI assistant (DashScope SDK Expert) | `pip install "dashscope[expert]"` |
133
+ | `expert-openai` | Run the assistant on an OpenAI-compatible model provider | `pip install "dashscope[expert-openai]"` |
134
+ | `expert-anthropic` | Run the assistant on an Anthropic model provider | `pip install "dashscope[expert-anthropic]"` |
135
+ | `expert-voice` | Voice input and spoken replies in the assistant | `pip install "dashscope[expert-voice]"` |
136
+ | `expert-camera` | Camera capture for image input in the assistant | `pip install "dashscope[expert-camera]"` |
137
+ | `expert-all` | All of the above (includes `expert`) | `pip install "dashscope[expert-all]"` |
138
+
139
+ The original `acli*` extra names remain as backward-compatible aliases with identical dependencies.
120
140
 
121
141
  To install from a source checkout:
122
142
 
@@ -264,6 +284,82 @@ resp.request_id
264
284
 
265
285
  All responses share a common envelope: `request_id`, `status_code`, `code`, `message`, `is_error`, and raw `headers`.
266
286
 
287
+ ### Pagination
288
+
289
+ List endpoints return a page object you can iterate and advance instead of looping `page_no` by hand:
290
+
291
+ ```python
292
+ page = client.models.list(page_no=1, page_size=10)
293
+
294
+ for model in page: # this page's items
295
+ ...
296
+ page.total_count # catalog total, as reported by the gateway
297
+ page.has_next_page()
298
+ page.next_page() # None on the last page
299
+
300
+ for page in client.models.list(page_size=50).iter_pages(): # every page
301
+ ...
302
+ ```
303
+
304
+ On `AsyncClient` use `await page.next_page_async()` and `async for page in page.iter_pages_async()`. Calling the synchronous traversal on an async-fetched page raises `TypeError` naming the async method, rather than handing back an un-awaited coroutine. `client.files.list()` and `client.images.jobs.list()` paginate the same way.
305
+
306
+ Serialize a page with `model_dump()`. Iterating a page yields its *items*, so `dict(page)` is not a way to read its fields.
307
+
308
+ `models.list(provider=...)` filters client-side: it narrows each page's `models`, while `total_count` stays the whole-catalog total. Pagination therefore walks the unfiltered catalog and the filter is applied to each page as it arrives.
309
+
310
+ ### Raw responses
311
+
312
+ Pass `raw=True` to get the response object itself, before any error check:
313
+
314
+ ```python
315
+ resp = client.models.list(raw=True)
316
+
317
+ resp.status_code
318
+ resp.headers # includes non-standard gateway headers
319
+ resp.request_id
320
+ resp.elapsed
321
+ resp.json() # decoded body
322
+ resp.parse(ModelList) # typed model, memoized per type
323
+ ```
324
+
325
+ `raw=True` skips the error check, so a 4xx/5xx is returned to you instead of raising. `raise_for_status()` applies it after the fact.
326
+
327
+ `parse(...)` needs the model class, and the v2 resource models are not re-exported from the top-level package — import them from where they are defined:
328
+
329
+ ```python
330
+ from dashscope.resources.models import ModelList, Model
331
+ from dashscope.resources.files import FileList, File
332
+ from dashscope.resources._jobs import Job, JobList
333
+ from dashscope.resources.embeddings import EmbeddingResponse
334
+ ```
335
+
336
+ `resp.parse(...)` is the generic envelope mapping and does not replay a resource's own reshaping — on `models.list`, a page the gateway delivered as a bare list parses through it as empty. Use `resp.json()` when you need exactly what the resource method would have built.
337
+
338
+ ### Per-request options
339
+
340
+ Every resource method that makes an HTTP request takes the same three escape hatches, for anything this SDK does not model yet:
341
+
342
+ ```python
343
+ client.chat.completions.create(
344
+ model="qwen-plus",
345
+ messages=["hi"],
346
+ extra_headers={"x-gateway-experiment": "on"},
347
+ extra_query={"debug": "1"},
348
+ extra_body={"parameters": {"top_k": 5}},
349
+ )
350
+ ```
351
+
352
+ `extra_headers` sits above every other layer — the SDK identity headers, the client defaults, your `headers=`, and a per-call `api_key=` / `workspace=` — matched case-insensitively. `extra_body` deep-merges nested dicts, so adding one nested field keeps its siblings; lists and scalars replace. A request whose body is not a JSON object (a file upload, raw bytes) has nothing to merge into, so `extra_body` is dropped with a warning rather than silently lost.
353
+
354
+ `max_retries` narrows or widens the retry budget for a single call, so a request that must not be replayed no longer needs a whole derived client:
355
+
356
+ ```python
357
+ client.deployments.list(max_retries=0) # one attempt, no retry
358
+ client.with_options(max_retries=5) # still works, client-wide
359
+ ```
360
+
361
+ Streaming methods take all four: `open_stream` retries only while no event has reached you yet, so a mid-stream failure is never replayed. The websocket methods (`audio.asr.recognize` / `recognize_file`, `tingwu.realtime`) take none of them — that transport has no per-request options channel, so a parameter there would be silently inert.
362
+
267
363
  ### Streaming
268
364
 
269
365
  `stream=True` returns a `ChatStream` (`AsyncChatStream` for `AsyncClient`) with typed helpers:
@@ -364,6 +460,7 @@ dashscope.settings.log_level = "INFO"
364
460
  | `DASHSCOPE_WEBSOCKET_BASE_URL` | Override the WebSocket endpoint | derived from region/workspace |
365
461
  | `DASHSCOPE_TIMEOUT` | Request timeout (seconds) | `300` |
366
462
  | `DASHSCOPE_MAX_RETRIES` | Automatic retries | `2` |
463
+ | `DASHSCOPE_STRICT_VALIDATION` | Raise on a response body that does not fit its typed model instead of degrading it | `false` |
367
464
  | `DASHSCOPE_HTTP_MAX_CONNECTIONS` | Connection-pool size | `100` |
368
465
  | `DASHSCOPE_HTTP_MAX_KEEPALIVE_CONNECTIONS` | Keep-alive connections held in the pool | `20` |
369
466
  | `DASHSCOPE_HTTP_KEEPALIVE_EXPIRY` | Keep-alive expiry (seconds) | `5.0` |
@@ -373,6 +470,10 @@ dashscope.settings.log_level = "INFO"
373
470
 
374
471
  The three `DASHSCOPE_HTTP_*` pool variables are also settable as `http_max_connections`, `http_max_keepalive_connections` and `http_keepalive_expiry` in `settings` and `config.toml`. Passing your own `http_client=` takes precedence over all of them.
375
472
 
473
+ By default a response body that does not fit the SDK's typed models is parsed in degraded form — the offending fields fall back to their defaults and the rest of the payload stays usable — with the drift recorded at `DEBUG` on the `dashscope._logging.parse` logger. Set `DASHSCOPE_STRICT_VALIDATION=true` (or `Client(strict_validation=True)`, `settings.strict_validation = True`, `strict_validation = true` in `config.toml`) to raise `APIResponseValidationError` instead, which is what you want in CI or contract tests. Strict validation raises even under `raise_on_error=False`: that flag governs service errors, this one governs parse errors.
474
+
475
+ One caveat: `DEBUG` is below the SDK's default log level, so a degraded parse is silent unless you raise it — see [Logging](#logging) — and `strict_validation` is the only way to make drift fail loudly. The typed-parse path covers every resource, and not only the final response object: streamed frames (`apps`, `deployments.stream_events`, `fine_tunes.stream_events`, `audio.tts.http.stream`) and websocket results (`audio.asr`) degrade frame by frame as well, so one malformed event cannot break an iteration partway through with a `pydantic.ValidationError` that no `except DashScopeError` would catch.
476
+
376
477
  **Config file** (`~/.dashscope/config.toml`):
377
478
 
378
479
  ```toml
@@ -511,11 +612,11 @@ For the latest model list, visit the [Model Studio model plaza](https://bailian.
511
612
 
512
613
  ## AI Assistant: DashScope SDK Expert
513
614
 
514
- The SDK ships with an interactive AI assistant, **DashScope SDK Expert**, built on the bundled Agentic CLI (`dashscope/acli`). It answers SDK/API questions, generates runnable examples, shows CLI usage, and diagnoses errors right in your terminal.
615
+ The SDK integrates an interactive AI assistant, **DashScope SDK Expert**, powered by the optional `dashscope-agenticx` dependency. It answers SDK/API questions, generates runnable examples, shows CLI usage, and diagnoses errors right in your terminal.
515
616
 
516
- - Run `dashscope` with no arguments to start the assistant. On first run it offers to install the 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.
617
+ - Run `dashscope` with no arguments to start the assistant. On first run it offers to download the Expert profile and per-domain skills into `./.agenticx/`; the same profile can be installed later with `agenticx expert download dashscope-sdk-expert`.
517
618
  - Ask it instead of reading docs — e.g. `dashscope expert "how do I stream chat output"` (asks once and exits). Type `/help` inside the assistant for available commands; `dashscope expert --help` shows all forms.
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).
619
+ - With Python 3.10+, install the `expert` extra: `pip install "dashscope[expert]"`. Add `expert-voice` / `expert-camera` for voice and camera input, or `expert-all` for everything — see the [extras table](#installation).
519
620
  - Full walkthrough: [DashScope SDK Expert guide](https://help.aliyun.com/en/model-studio/dashscope-sdk-expert).
520
621
 
521
622
  ## Command line
@@ -1,88 +1,9 @@
1
- Metadata-Version: 2.4
2
- Name: dashscope
3
- Version: 2.0.4
4
- Summary: dashscope client sdk library
5
- Home-page: https://dashscope.aliyun.com/
6
- Author: Alibaba Cloud
7
- Author-email: dashscope@alibabacloud.com
8
- License: Apache 2.0
9
- Platform: Posix; MacOS X; Windows
10
- Classifier: Development Status :: 4 - Beta
11
- Classifier: Intended Audience :: Developers
12
- Classifier: License :: OSI Approved :: Apache Software License
13
- Classifier: Programming Language :: Python
14
- Classifier: Programming Language :: Python :: 3
15
- Classifier: Programming Language :: Python :: 3.9
16
- Classifier: Programming Language :: Python :: 3.10
17
- Classifier: Programming Language :: Python :: 3.11
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
22
- Description-Content-Type: text/markdown
23
- License-File: LICENSE
24
- License-File: LICENSE.certifi
25
- License-File: NOTICE
26
- Requires-Dist: aiohttp
27
- Requires-Dist: requests
28
- Requires-Dist: websocket-client
29
- Requires-Dist: cryptography
30
- Requires-Dist: certifi>=2024.7.4
31
- Requires-Dist: typer>=0.9.0
32
- Requires-Dist: rich>=13.0.0
33
- Requires-Dist: tomli>=1.1.0; python_version < "3.11"
34
- Requires-Dist: httpx>=0.27.0
35
- Requires-Dist: httpx-sse>=0.4.0
36
- Requires-Dist: typing_extensions>=4.16.0
37
- Requires-Dist: tiktoken
38
- Requires-Dist: pydantic>=2.0
39
- Requires-Dist: tenacity
40
- Requires-Dist: PyYAML>=6.0
41
- Requires-Dist: fastapi>=0.100
42
- Requires-Dist: uvicorn>=0.20
43
- Requires-Dist: opentelemetry-sdk>=1.20
44
- Provides-Extra: acli
45
- Requires-Dist: prompt-toolkit>=3.0; extra == "acli"
46
- Requires-Dist: textual<9,>=0.50; extra == "acli"
47
- Requires-Dist: PyYAML>=6.0; extra == "acli"
48
- Requires-Dist: tomli>=2.0; python_version < "3.11" and extra == "acli"
49
- Provides-Extra: acli-anthropic
50
- Requires-Dist: anthropic<2,>=0.40; extra == "acli-anthropic"
51
- Provides-Extra: acli-openai
52
- Requires-Dist: openai<4,>=1.30; extra == "acli-openai"
53
- Provides-Extra: acli-voice
54
- Requires-Dist: sounddevice>=0.4; extra == "acli-voice"
55
- Requires-Dist: numpy>=1.20; extra == "acli-voice"
56
- Provides-Extra: acli-camera
57
- Requires-Dist: opencv-python-headless>=4.5; extra == "acli-camera"
58
- Provides-Extra: acli-all
59
- Requires-Dist: prompt-toolkit>=3.0; extra == "acli-all"
60
- Requires-Dist: textual<9,>=0.50; extra == "acli-all"
61
- Requires-Dist: PyYAML>=6.0; extra == "acli-all"
62
- Requires-Dist: tomli>=2.0; python_version < "3.11" and extra == "acli-all"
63
- Requires-Dist: anthropic<2,>=0.40; extra == "acli-all"
64
- Requires-Dist: openai<4,>=1.30; extra == "acli-all"
65
- Requires-Dist: sounddevice>=0.4; extra == "acli-all"
66
- Requires-Dist: numpy>=1.20; extra == "acli-all"
67
- Requires-Dist: opencv-python-headless>=4.5; extra == "acli-all"
68
- Dynamic: author
69
- Dynamic: author-email
70
- Dynamic: classifier
71
- Dynamic: description
72
- Dynamic: description-content-type
73
- Dynamic: home-page
74
- Dynamic: license
75
- Dynamic: license-file
76
- Dynamic: platform
77
- Dynamic: provides-extra
78
- Dynamic: requires-dist
79
- Dynamic: requires-python
80
- Dynamic: summary
81
-
82
1
  # DashScope Python SDK
83
2
 
84
3
  > **English** | [中文](README_zh.md)
85
4
 
5
+ **Documentation**: [dashscope.github.io/dashscope-sdk-python](https://dashscope.github.io/dashscope-sdk-python/) — [中文文档](https://dashscope.github.io/dashscope-sdk-python/zh/)
6
+
86
7
  The DashScope Python SDK is the official client for [Alibaba Cloud Model Studio (Bailian)](https://www.alibabacloud.com/help/en/model-studio/), covering text generation, multi-modal understanding, embeddings, reranking, image/video generation, speech synthesis & recognition, fine-tuning, agentic RL, applications and more.
87
8
 
88
9
  **Version 2.0** introduces a resource-style client — `dashscope.Client()` — modeled on the ergonomics of the OpenAI SDK: one client holds a shared connection pool, every capability hangs off it as a typed resource (`client.chat`, `client.images`, `client.audio`, …), responses are typed objects instead of raw dicts, and failures raise exceptions by default. The complete 1.x public surface remains available at its historical import paths and is implemented by facades under `dashscope.legacy_1x`; AgentStudio and Agentic RL share their large business cores with 2.0 without sharing public return or error contracts.
@@ -107,16 +28,18 @@ The DashScope Python SDK is the official client for [Alibaba Cloud Model Studio
107
28
  pip install -U dashscope
108
29
  ```
109
30
 
110
- The base install covers SDK API calls, the `dashscope` CLI command, Agentic RL fine-tuning and the local tokenizer. Python 3.9+ is required. Optional feature groups all belong to the bundled AI assistant:
31
+ The base install covers SDK API calls, the `dashscope` CLI command, Agentic RL fine-tuning and the local tokenizer. Python 3.9+ is required. Optional feature groups configure the AI assistant provided by `dashscope-agenticx`; the assistant requires Python 3.10+:
111
32
 
112
33
  | Extra | Provides | Install |
113
34
  |-------|----------|---------|
114
- | `acli` | Interactive AI assistant (DashScope SDK Expert) | `pip install "dashscope[acli]"` |
115
- | `acli-openai` | Run the assistant on an OpenAI-compatible model provider | `pip install "dashscope[acli-openai]"` |
116
- | `acli-anthropic` | Run the assistant on an Anthropic model provider | `pip install "dashscope[acli-anthropic]"` |
117
- | `acli-voice` | Voice input and spoken replies in the assistant | `pip install "dashscope[acli-voice]"` |
118
- | `acli-camera` | Camera capture for image input in the assistant | `pip install "dashscope[acli-camera]"` |
119
- | `acli-all` | All of the above (includes `acli`) | `pip install "dashscope[acli-all]"` |
35
+ | `expert` | Interactive AI assistant (DashScope SDK Expert) | `pip install "dashscope[expert]"` |
36
+ | `expert-openai` | Run the assistant on an OpenAI-compatible model provider | `pip install "dashscope[expert-openai]"` |
37
+ | `expert-anthropic` | Run the assistant on an Anthropic model provider | `pip install "dashscope[expert-anthropic]"` |
38
+ | `expert-voice` | Voice input and spoken replies in the assistant | `pip install "dashscope[expert-voice]"` |
39
+ | `expert-camera` | Camera capture for image input in the assistant | `pip install "dashscope[expert-camera]"` |
40
+ | `expert-all` | All of the above (includes `expert`) | `pip install "dashscope[expert-all]"` |
41
+
42
+ The original `acli*` extra names remain as backward-compatible aliases with identical dependencies.
120
43
 
121
44
  To install from a source checkout:
122
45
 
@@ -264,6 +187,82 @@ resp.request_id
264
187
 
265
188
  All responses share a common envelope: `request_id`, `status_code`, `code`, `message`, `is_error`, and raw `headers`.
266
189
 
190
+ ### Pagination
191
+
192
+ List endpoints return a page object you can iterate and advance instead of looping `page_no` by hand:
193
+
194
+ ```python
195
+ page = client.models.list(page_no=1, page_size=10)
196
+
197
+ for model in page: # this page's items
198
+ ...
199
+ page.total_count # catalog total, as reported by the gateway
200
+ page.has_next_page()
201
+ page.next_page() # None on the last page
202
+
203
+ for page in client.models.list(page_size=50).iter_pages(): # every page
204
+ ...
205
+ ```
206
+
207
+ On `AsyncClient` use `await page.next_page_async()` and `async for page in page.iter_pages_async()`. Calling the synchronous traversal on an async-fetched page raises `TypeError` naming the async method, rather than handing back an un-awaited coroutine. `client.files.list()` and `client.images.jobs.list()` paginate the same way.
208
+
209
+ Serialize a page with `model_dump()`. Iterating a page yields its *items*, so `dict(page)` is not a way to read its fields.
210
+
211
+ `models.list(provider=...)` filters client-side: it narrows each page's `models`, while `total_count` stays the whole-catalog total. Pagination therefore walks the unfiltered catalog and the filter is applied to each page as it arrives.
212
+
213
+ ### Raw responses
214
+
215
+ Pass `raw=True` to get the response object itself, before any error check:
216
+
217
+ ```python
218
+ resp = client.models.list(raw=True)
219
+
220
+ resp.status_code
221
+ resp.headers # includes non-standard gateway headers
222
+ resp.request_id
223
+ resp.elapsed
224
+ resp.json() # decoded body
225
+ resp.parse(ModelList) # typed model, memoized per type
226
+ ```
227
+
228
+ `raw=True` skips the error check, so a 4xx/5xx is returned to you instead of raising. `raise_for_status()` applies it after the fact.
229
+
230
+ `parse(...)` needs the model class, and the v2 resource models are not re-exported from the top-level package — import them from where they are defined:
231
+
232
+ ```python
233
+ from dashscope.resources.models import ModelList, Model
234
+ from dashscope.resources.files import FileList, File
235
+ from dashscope.resources._jobs import Job, JobList
236
+ from dashscope.resources.embeddings import EmbeddingResponse
237
+ ```
238
+
239
+ `resp.parse(...)` is the generic envelope mapping and does not replay a resource's own reshaping — on `models.list`, a page the gateway delivered as a bare list parses through it as empty. Use `resp.json()` when you need exactly what the resource method would have built.
240
+
241
+ ### Per-request options
242
+
243
+ Every resource method that makes an HTTP request takes the same three escape hatches, for anything this SDK does not model yet:
244
+
245
+ ```python
246
+ client.chat.completions.create(
247
+ model="qwen-plus",
248
+ messages=["hi"],
249
+ extra_headers={"x-gateway-experiment": "on"},
250
+ extra_query={"debug": "1"},
251
+ extra_body={"parameters": {"top_k": 5}},
252
+ )
253
+ ```
254
+
255
+ `extra_headers` sits above every other layer — the SDK identity headers, the client defaults, your `headers=`, and a per-call `api_key=` / `workspace=` — matched case-insensitively. `extra_body` deep-merges nested dicts, so adding one nested field keeps its siblings; lists and scalars replace. A request whose body is not a JSON object (a file upload, raw bytes) has nothing to merge into, so `extra_body` is dropped with a warning rather than silently lost.
256
+
257
+ `max_retries` narrows or widens the retry budget for a single call, so a request that must not be replayed no longer needs a whole derived client:
258
+
259
+ ```python
260
+ client.deployments.list(max_retries=0) # one attempt, no retry
261
+ client.with_options(max_retries=5) # still works, client-wide
262
+ ```
263
+
264
+ Streaming methods take all four: `open_stream` retries only while no event has reached you yet, so a mid-stream failure is never replayed. The websocket methods (`audio.asr.recognize` / `recognize_file`, `tingwu.realtime`) take none of them — that transport has no per-request options channel, so a parameter there would be silently inert.
265
+
267
266
  ### Streaming
268
267
 
269
268
  `stream=True` returns a `ChatStream` (`AsyncChatStream` for `AsyncClient`) with typed helpers:
@@ -364,6 +363,7 @@ dashscope.settings.log_level = "INFO"
364
363
  | `DASHSCOPE_WEBSOCKET_BASE_URL` | Override the WebSocket endpoint | derived from region/workspace |
365
364
  | `DASHSCOPE_TIMEOUT` | Request timeout (seconds) | `300` |
366
365
  | `DASHSCOPE_MAX_RETRIES` | Automatic retries | `2` |
366
+ | `DASHSCOPE_STRICT_VALIDATION` | Raise on a response body that does not fit its typed model instead of degrading it | `false` |
367
367
  | `DASHSCOPE_HTTP_MAX_CONNECTIONS` | Connection-pool size | `100` |
368
368
  | `DASHSCOPE_HTTP_MAX_KEEPALIVE_CONNECTIONS` | Keep-alive connections held in the pool | `20` |
369
369
  | `DASHSCOPE_HTTP_KEEPALIVE_EXPIRY` | Keep-alive expiry (seconds) | `5.0` |
@@ -373,6 +373,10 @@ dashscope.settings.log_level = "INFO"
373
373
 
374
374
  The three `DASHSCOPE_HTTP_*` pool variables are also settable as `http_max_connections`, `http_max_keepalive_connections` and `http_keepalive_expiry` in `settings` and `config.toml`. Passing your own `http_client=` takes precedence over all of them.
375
375
 
376
+ By default a response body that does not fit the SDK's typed models is parsed in degraded form — the offending fields fall back to their defaults and the rest of the payload stays usable — with the drift recorded at `DEBUG` on the `dashscope._logging.parse` logger. Set `DASHSCOPE_STRICT_VALIDATION=true` (or `Client(strict_validation=True)`, `settings.strict_validation = True`, `strict_validation = true` in `config.toml`) to raise `APIResponseValidationError` instead, which is what you want in CI or contract tests. Strict validation raises even under `raise_on_error=False`: that flag governs service errors, this one governs parse errors.
377
+
378
+ One caveat: `DEBUG` is below the SDK's default log level, so a degraded parse is silent unless you raise it — see [Logging](#logging) — and `strict_validation` is the only way to make drift fail loudly. The typed-parse path covers every resource, and not only the final response object: streamed frames (`apps`, `deployments.stream_events`, `fine_tunes.stream_events`, `audio.tts.http.stream`) and websocket results (`audio.asr`) degrade frame by frame as well, so one malformed event cannot break an iteration partway through with a `pydantic.ValidationError` that no `except DashScopeError` would catch.
379
+
376
380
  **Config file** (`~/.dashscope/config.toml`):
377
381
 
378
382
  ```toml
@@ -511,11 +515,11 @@ For the latest model list, visit the [Model Studio model plaza](https://bailian.
511
515
 
512
516
  ## AI Assistant: DashScope SDK Expert
513
517
 
514
- The SDK ships with an interactive AI assistant, **DashScope SDK Expert**, built on the bundled Agentic CLI (`dashscope/acli`). It answers SDK/API questions, generates runnable examples, shows CLI usage, and diagnoses errors right in your terminal.
518
+ The SDK integrates an interactive AI assistant, **DashScope SDK Expert**, powered by the optional `dashscope-agenticx` dependency. It answers SDK/API questions, generates runnable examples, shows CLI usage, and diagnoses errors right in your terminal.
515
519
 
516
- - Run `dashscope` with no arguments to start the assistant. On first run it offers to install the 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.
520
+ - Run `dashscope` with no arguments to start the assistant. On first run it offers to download the Expert profile and per-domain skills into `./.agenticx/`; the same profile can be installed later with `agenticx expert download dashscope-sdk-expert`.
517
521
  - Ask it instead of reading docs — e.g. `dashscope expert "how do I stream chat output"` (asks once and exits). Type `/help` inside the assistant for available commands; `dashscope expert --help` shows all forms.
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).
522
+ - With Python 3.10+, install the `expert` extra: `pip install "dashscope[expert]"`. Add `expert-voice` / `expert-camera` for voice and camera input, or `expert-all` for everything — see the [extras table](#installation).
519
523
  - Full walkthrough: [DashScope SDK Expert guide](https://help.aliyun.com/en/model-studio/dashscope-sdk-expert).
520
524
 
521
525
  ## Command line
@@ -95,11 +95,15 @@ _MAAS_REGIONS = {*MAAS_REGIONS, "cn-beijing"}
95
95
 
96
96
 
97
97
  def set_region(region: str, workspace_id: str = None):
98
- """Switch to a specific MaaS region.
98
+ """Switch to a specific MaaS region (legacy 1.x helper).
99
99
 
100
100
  Updates base_http_api_url, base_compatible_api_url and
101
101
  base_websocket_api_url to point to the MaaS endpoint for the
102
- given region and workspace.
102
+ given region and workspace. These module-level variables are
103
+ only read by ``dashscope.legacy_1x``; this call does not affect
104
+ ``Client`` / ``AsyncClient`` configuration resolution. For the
105
+ current client use ``Client(region=..., workspace=...)`` or
106
+ ``dashscope.settings.region`` instead.
103
107
 
104
108
  Args:
105
109
  region (str): The MaaS region, e.g. "ap-southeast-1",
@@ -132,6 +136,36 @@ def set_region(region: str, workspace_id: str = None):
132
136
  base_websocket_api_url = f"wss://{host}/api-ws/v1/inference"
133
137
 
134
138
 
139
+ def enable_dev_mock(
140
+ mode: str = "static",
141
+ fixture_path: "str | None" = None,
142
+ ) -> None:
143
+ """Turn on the dev mock process-wide (``static``/``replay``/``record``).
144
+
145
+ Thin forwarder to :mod:`dashscope.devkit`; imported lazily so the
146
+ devkit package is never loaded on the production success path. Once
147
+ enabled, every ``Client``/``AsyncClient`` HTTP call is intercepted at
148
+ the transport. Equivalent to ``DASHSCOPE_DEV_MOCK=<mode>``.
149
+ """
150
+ from dashscope import devkit
151
+
152
+ devkit.enable_dev_mock(mode, fixture_path)
153
+
154
+
155
+ def disable_dev_mock() -> None:
156
+ """Turn the dev mock back off (forwarder to the devkit package)."""
157
+ from dashscope import devkit
158
+
159
+ devkit.disable_dev_mock()
160
+
161
+
162
+ def dev_mock_active() -> bool:
163
+ """Whether the dev mock is currently active."""
164
+ from dashscope import devkit
165
+
166
+ return devkit.is_active()
167
+
168
+
135
169
  # The Assistants API (dashscope.legacy_1x.assistants /
136
170
  # dashscope.legacy_1x.threads) is deprecated.
137
171
  # Resolve its names lazily (PEP 562) so a plain `import dashscope` does not emit
@@ -275,6 +309,9 @@ __all__ = [
275
309
  "WsConnection",
276
310
  "WsTask",
277
311
  "chat",
312
+ "dev_mock_active",
313
+ "disable_dev_mock",
314
+ "enable_dev_mock",
278
315
  "errors",
279
316
  "set_region",
280
317
  ]
@@ -41,11 +41,16 @@ def close_shared_sync_session() -> None: ...
41
41
  def set_region(region: str, workspace_id: Optional[str] = ...) -> None: ...
42
42
 
43
43
  # Lazily resolved compatibility modules.
44
+ # ``applications`` is a real 2.0 subpackage: re-export it as a module so type
45
+ # checkers and griffe keep access to its submodules (e.g. applications.finetune
46
+ # and applications.agentstudio). Declaring it as ``applications: Any`` would
47
+ # let griffe's stub merge shadow the submodule with a plain attribute.
48
+ from dashscope import applications as applications
49
+
44
50
  aigc: Any
45
51
  agentstudio: Any
46
52
  api_entities: Any
47
53
  app: Any
48
- applications: Any
49
54
  assistants: Any
50
55
  audio: Any
51
56
  cli: Any