dashscope 1.26.2__tar.gz → 1.26.3__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 (212) hide show
  1. dashscope-1.26.3/LICENSE.certifi +20 -0
  2. {dashscope-1.26.2 → dashscope-1.26.3}/MANIFEST.in +2 -0
  3. dashscope-1.26.3/NOTICE +3 -0
  4. {dashscope-1.26.2/dashscope.egg-info → dashscope-1.26.3}/PKG-INFO +3 -1
  5. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/audio/http_tts/http_speech_synthesizer.py +49 -1
  6. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/cli/__init__.py +0 -6
  7. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/cli/agentic_rl.py +14 -1
  8. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/cli/code_generation.py +3 -2
  9. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/cli/common.py +42 -5
  10. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/cli/deployments.py +75 -10
  11. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/cli/files.py +12 -1
  12. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/cli/fine_tunes.py +65 -9
  13. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/cli/image_synthesis.py +2 -1
  14. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/cli/speech_synthesis.py +19 -1
  15. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/cli/transcription.py +3 -1
  16. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/cli/understanding.py +3 -2
  17. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/cli/video_synthesis.py +3 -1
  18. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/data/base_data_model.py +1 -0
  19. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/version.py +1 -1
  20. {dashscope-1.26.2 → dashscope-1.26.3/dashscope.egg-info}/PKG-INFO +3 -1
  21. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope.egg-info/SOURCES.txt +2 -0
  22. {dashscope-1.26.2 → dashscope-1.26.3}/LICENSE +0 -0
  23. {dashscope-1.26.2 → dashscope-1.26.3}/README.md +0 -0
  24. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/__init__.py +0 -0
  25. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/agentstudio/__init__.py +0 -0
  26. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/agentstudio/client.py +0 -0
  27. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/agentstudio/constants.py +0 -0
  28. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/agentstudio/exceptions.py +0 -0
  29. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/agentstudio/pagination.py +0 -0
  30. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/agentstudio/resources/__init__.py +0 -0
  31. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/agentstudio/resources/_helpers.py +0 -0
  32. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/agentstudio/resources/agents.py +0 -0
  33. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/agentstudio/resources/environments.py +0 -0
  34. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/agentstudio/resources/files.py +0 -0
  35. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/agentstudio/resources/session_events.py +0 -0
  36. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/agentstudio/resources/sessions.py +0 -0
  37. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/agentstudio/resources/skills.py +0 -0
  38. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/agentstudio/resources/vaults.py +0 -0
  39. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/agentstudio/streaming.py +0 -0
  40. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/agentstudio/transport.py +0 -0
  41. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/agentstudio/types/__init__.py +0 -0
  42. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/agentstudio/types/models.py +0 -0
  43. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/agentstudio/types/params.py +0 -0
  44. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/aigc/__init__.py +0 -0
  45. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/aigc/chat_completion.py +0 -0
  46. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/aigc/code_generation.py +0 -0
  47. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/aigc/conversation.py +0 -0
  48. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/aigc/generation.py +0 -0
  49. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/aigc/image_generation.py +0 -0
  50. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/aigc/image_synthesis.py +0 -0
  51. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/aigc/multimodal_conversation.py +0 -0
  52. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/aigc/video_synthesis.py +0 -0
  53. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/api_entities/__init__.py +0 -0
  54. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/api_entities/aio_session.py +0 -0
  55. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/api_entities/aiohttp_request.py +0 -0
  56. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/api_entities/api_request_data.py +0 -0
  57. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/api_entities/api_request_factory.py +0 -0
  58. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/api_entities/base_request.py +0 -0
  59. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/api_entities/chat_completion_types.py +0 -0
  60. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/api_entities/dashscope_response.py +0 -0
  61. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/api_entities/encryption.py +0 -0
  62. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/api_entities/http_request.py +0 -0
  63. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/api_entities/websocket_request.py +0 -0
  64. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/app/__init__.py +0 -0
  65. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/app/application.py +0 -0
  66. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/app/application_response.py +0 -0
  67. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/assistants/__init__.py +0 -0
  68. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/assistants/assistant_types.py +0 -0
  69. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/assistants/assistants.py +0 -0
  70. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/assistants/files.py +0 -0
  71. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/audio/__init__.py +0 -0
  72. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/audio/asr/__init__.py +0 -0
  73. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/audio/asr/asr_phrase_manager.py +0 -0
  74. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/audio/asr/recognition.py +0 -0
  75. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/audio/asr/transcription.py +0 -0
  76. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/audio/asr/translation_recognizer.py +0 -0
  77. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/audio/asr/vocabulary.py +0 -0
  78. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/audio/http_tts/__init__.py +0 -0
  79. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/audio/qwen_asr/__init__.py +0 -0
  80. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/audio/qwen_asr/qwen_transcription.py +0 -0
  81. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/audio/qwen_omni/__init__.py +0 -0
  82. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/audio/qwen_omni/omni_realtime.py +0 -0
  83. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/audio/qwen_tts/__init__.py +0 -0
  84. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/audio/qwen_tts/speech_synthesizer.py +0 -0
  85. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/audio/qwen_tts_realtime/__init__.py +0 -0
  86. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/audio/qwen_tts_realtime/qwen_tts_realtime.py +0 -0
  87. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/audio/tts/__init__.py +0 -0
  88. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/audio/tts/speech_synthesizer.py +0 -0
  89. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/audio/tts_v2/__init__.py +0 -0
  90. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/audio/tts_v2/enrollment.py +0 -0
  91. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/audio/tts_v2/speech_synthesizer.py +0 -0
  92. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/cli/__main__.py +0 -0
  93. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/cli/application.py +0 -0
  94. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/cli/embeddings.py +0 -0
  95. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/cli/generation.py +0 -0
  96. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/cli/image_generation.py +0 -0
  97. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/cli/models.py +0 -0
  98. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/cli/multimodal_conversation.py +0 -0
  99. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/cli/multimodal_embedding.py +0 -0
  100. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/cli/oss.py +0 -0
  101. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/cli/rerank.py +0 -0
  102. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/cli/tokenization.py +0 -0
  103. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/client/__init__.py +0 -0
  104. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/client/base_api.py +0 -0
  105. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/common/__init__.py +0 -0
  106. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/common/api_key.py +0 -0
  107. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/common/base_type.py +0 -0
  108. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/common/constants.py +0 -0
  109. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/common/env.py +0 -0
  110. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/common/error.py +0 -0
  111. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/common/logging.py +0 -0
  112. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/common/message_manager.py +0 -0
  113. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/common/utils.py +0 -0
  114. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/embeddings/__init__.py +0 -0
  115. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/embeddings/batch_text_embedding.py +0 -0
  116. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/embeddings/batch_text_embedding_response.py +0 -0
  117. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/embeddings/multimodal_embedding.py +0 -0
  118. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/embeddings/text_embedding.py +0 -0
  119. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/files.py +0 -0
  120. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/__init__.py +0 -0
  121. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/agentic_rl.py +0 -0
  122. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/customize_types.py +0 -0
  123. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/deployments.py +0 -0
  124. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/finetunes.py +0 -0
  125. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/__init__.py +0 -0
  126. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/common/__init__.py +0 -0
  127. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/common/constants.py +0 -0
  128. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/common/errors.py +0 -0
  129. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/common/log.py +0 -0
  130. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/common/model.py +0 -0
  131. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/common/model_types.py +0 -0
  132. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/common/utils.py +0 -0
  133. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/__init__.py +0 -0
  134. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/data/__init__.py +0 -0
  135. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/data/group_reward_input.py +0 -0
  136. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/data/group_reward_output.py +0 -0
  137. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/data/reward_input.py +0 -0
  138. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/data/reward_output.py +0 -0
  139. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/data/rollout_input.py +0 -0
  140. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/data/rollout_output.py +0 -0
  141. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/demo/__init__.py +0 -0
  142. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/demo/group_reward_processor_demo.py +0 -0
  143. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/demo/reward_processor_demo.py +0 -0
  144. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/demo/rollout_processor_demo.py +0 -0
  145. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/func_decorator.py +0 -0
  146. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/func_manager.py +0 -0
  147. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/observability/__init__.py +0 -0
  148. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/observability/genai/__init__.py +0 -0
  149. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/observability/genai/_core.py +0 -0
  150. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/observability/genai/llm_dashscope.py +0 -0
  151. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/observability/genai/llm_openai.py +0 -0
  152. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/observability/genai/llm_span.py +0 -0
  153. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/observability/genai/messages.py +0 -0
  154. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/observability/genai/tools.py +0 -0
  155. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/observability/processor_span.py +0 -0
  156. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/observability/tracing.py +0 -0
  157. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/parser/__init__.py +0 -0
  158. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/parser/base_parser.py +0 -0
  159. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/parser/group_reward_parser.py +0 -0
  160. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/parser/reward_parser.py +0 -0
  161. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/parser/rollout_parser.py +0 -0
  162. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/processor/__init__.py +0 -0
  163. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/processor/abstract_group_reward_processor.py +0 -0
  164. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/processor/abstract_processor.py +0 -0
  165. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/processor/abstract_reward_processor.py +0 -0
  166. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/processor/abstract_rollout_processor.py +0 -0
  167. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/server/__init__.py +0 -0
  168. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/finetune/reinforcement/component/server/server.py +0 -0
  169. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/io/__init__.py +0 -0
  170. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/io/input_output.py +0 -0
  171. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/model.py +0 -0
  172. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/models.py +0 -0
  173. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/multimodal/__init__.py +0 -0
  174. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/multimodal/dialog_state.py +0 -0
  175. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/multimodal/multimodal_constants.py +0 -0
  176. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/multimodal/multimodal_dialog.py +0 -0
  177. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/multimodal/multimodal_request_params.py +0 -0
  178. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/multimodal/tingwu/__init__.py +0 -0
  179. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/multimodal/tingwu/tingwu.py +0 -0
  180. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/multimodal/tingwu/tingwu_realtime.py +0 -0
  181. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/nlp/__init__.py +0 -0
  182. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/nlp/understanding.py +0 -0
  183. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/protocol/__init__.py +0 -0
  184. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/protocol/websocket.py +0 -0
  185. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/rerank/__init__.py +0 -0
  186. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/rerank/text_rerank.py +0 -0
  187. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/resources/qwen.tiktoken +0 -0
  188. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/threads/__init__.py +0 -0
  189. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/threads/messages/__init__.py +0 -0
  190. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/threads/messages/files.py +0 -0
  191. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/threads/messages/messages.py +0 -0
  192. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/threads/runs/__init__.py +0 -0
  193. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/threads/runs/runs.py +0 -0
  194. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/threads/runs/steps.py +0 -0
  195. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/threads/thread_types.py +0 -0
  196. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/threads/threads.py +0 -0
  197. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/tokenizers/__init__.py +0 -0
  198. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/tokenizers/qwen_tokenizer.py +0 -0
  199. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/tokenizers/tokenization.py +0 -0
  200. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/tokenizers/tokenizer.py +0 -0
  201. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/tokenizers/tokenizer_base.py +0 -0
  202. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/utils/__init__.py +0 -0
  203. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/utils/message_utils.py +0 -0
  204. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/utils/oss_utils.py +0 -0
  205. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope/utils/param_utils.py +0 -0
  206. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope.egg-info/dependency_links.txt +0 -0
  207. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope.egg-info/entry_points.txt +0 -0
  208. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope.egg-info/not-zip-safe +0 -0
  209. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope.egg-info/requires.txt +0 -0
  210. {dashscope-1.26.2 → dashscope-1.26.3}/dashscope.egg-info/top_level.txt +0 -0
  211. {dashscope-1.26.2 → dashscope-1.26.3}/setup.cfg +0 -0
  212. {dashscope-1.26.2 → dashscope-1.26.3}/setup.py +0 -0
@@ -0,0 +1,20 @@
1
+ This package contains a modified version of ca-bundle.crt:
2
+
3
+ ca-bundle.crt -- Bundle of CA Root Certificates
4
+
5
+ This is a bundle of X.509 certificates of public Certificate Authorities
6
+ (CA). These were automatically extracted from Mozilla's root certificates
7
+ file (certdata.txt). This file can be found in the mozilla source tree:
8
+ https://hg.mozilla.org/mozilla-central/file/tip/security/nss/lib/ckfw/builtins/certdata.txt
9
+ It contains the certificates in PEM format and therefore
10
+ can be directly used with curl / libcurl / php_curl, or with
11
+ an Apache+mod_ssl webserver for SSL client authentication.
12
+ Just configure this file as the SSLCACertificateFile.#
13
+
14
+ ***** BEGIN LICENSE BLOCK *****
15
+ This Source Code Form is subject to the terms of the Mozilla Public License,
16
+ v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain
17
+ one at http://mozilla.org/MPL/2.0/.
18
+
19
+ ***** END LICENSE BLOCK *****
20
+ @(#) $RCSfile: certdata.txt,v $ $Revision: 1.80 $ $Date: 2011/11/03 15:11:58 $
@@ -1 +1,3 @@
1
1
  include dashscope/resources/qwen.tiktoken
2
+ include NOTICE
3
+ include LICENSE.certifi
@@ -0,0 +1,3 @@
1
+ This product depends on certifi (https://github.com/certifi/python-certifi),
2
+ which is provided under the Mozilla Public License 2.0.
3
+ See bundled LICENSE.certifi for details.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dashscope
3
- Version: 1.26.2
3
+ Version: 1.26.3
4
4
  Summary: dashscope client sdk library
5
5
  Home-page: https://dashscope.aliyun.com/
6
6
  Author: Alibaba Cloud
@@ -20,6 +20,8 @@ Requires-Python: >=3.8.0
20
20
  Description-Content-Type: text/markdown
21
21
  Provides-Extra: tokenizer
22
22
  License-File: LICENSE
23
+ License-File: LICENSE.certifi
24
+ License-File: NOTICE
23
25
 
24
26
  # DashScope Python SDK
25
27
 
@@ -14,7 +14,12 @@ from dashscope.common.constants import HTTPMethod
14
14
 
15
15
 
16
16
  class HttpSpeechSynthesisResult:
17
- """The result of HTTP speech synthesis."""
17
+ """The result of HTTP speech synthesis.
18
+
19
+ This class wraps the actual SpeechSynthesisResponse and provides
20
+ convenient access to both synthesis-specific data and standard
21
+ DashScopeAPIResponse attributes for compatibility with CLI tools.
22
+ """
18
23
 
19
24
  def __init__(
20
25
  self,
@@ -62,6 +67,49 @@ class HttpSpeechSynthesisResult:
62
67
  """Get the full API response."""
63
68
  return self._response
64
69
 
70
+ # Proxy standard DashScopeAPIResponse attributes for CLI compatibility
71
+ @property
72
+ def request_id(self) -> str:
73
+ """Get the request ID from the underlying response."""
74
+ if self._response:
75
+ return self._response.request_id
76
+ return ""
77
+
78
+ @property
79
+ def status_code(self) -> int:
80
+ """Get the HTTP status code from the underlying response."""
81
+ if self._response:
82
+ return self._response.status_code
83
+ return 0
84
+
85
+ @property
86
+ def code(self) -> str:
87
+ """Get the error code from the underlying response."""
88
+ if self._response:
89
+ return self._response.code
90
+ return ""
91
+
92
+ @property
93
+ def message(self) -> str:
94
+ """Get the error message from the underlying response."""
95
+ if self._response:
96
+ return self._response.message
97
+ return ""
98
+
99
+ @property
100
+ def output(self):
101
+ """Get the output from the underlying response."""
102
+ if self._response:
103
+ return self._response.output
104
+ return None
105
+
106
+ @property
107
+ def usage(self):
108
+ """Get the usage from the underlying response."""
109
+ if self._response:
110
+ return self._response.usage
111
+ return None
112
+
65
113
 
66
114
  class HttpSpeechSynthesizer(BaseApi):
67
115
  """HTTP-based text-to-speech interface for CosyVoice."""
@@ -23,7 +23,6 @@ from dashscope.cli.common import err_console # noqa: E402
23
23
  from dashscope.common.error import AuthenticationError # noqa: E402
24
24
  from dashscope.cli import ( # noqa: E402
25
25
  application,
26
- code_generation,
27
26
  deployments,
28
27
  embeddings,
29
28
  files,
@@ -39,7 +38,6 @@ from dashscope.cli import ( # noqa: E402
39
38
  speech_synthesis,
40
39
  tokenization,
41
40
  transcription,
42
- understanding,
43
41
  video_synthesis,
44
42
  )
45
43
 
@@ -97,9 +95,7 @@ _TOP_LEVEL_COMMANDS = {
97
95
  "embeddings",
98
96
  "tokenization",
99
97
  "models",
100
- "understanding",
101
98
  "application",
102
- "code-generation",
103
99
  "image-synthesis",
104
100
  "video-synthesis",
105
101
  "image-generation",
@@ -276,9 +272,7 @@ app.add_typer(rerank.app)
276
272
  app.add_typer(embeddings.app)
277
273
  app.add_typer(tokenization.app)
278
274
  app.add_typer(models.app)
279
- app.add_typer(understanding.app)
280
275
  app.add_typer(application.app)
281
- app.add_typer(code_generation.app)
282
276
  app.add_typer(image_synthesis.app)
283
277
  app.add_typer(video_synthesis.app)
284
278
  app.add_typer(image_generation.app)
@@ -545,6 +545,10 @@ def run(
545
545
  description="[green]✅ Job submitted successfully![/green]",
546
546
  )
547
547
 
548
+ # Validate output is not None before accessing attributes
549
+ if result.output is None:
550
+ raise OutputError("API returned success but output is empty")
551
+
548
552
  format_output(
549
553
  {
550
554
  "job_id": result.output.job_id,
@@ -597,6 +601,10 @@ def get(
597
601
  f"API returned status {result.status_code}: {result.message}",
598
602
  )
599
603
 
604
+ # Validate output is not None before accessing attributes
605
+ if result.output is None:
606
+ raise OutputError("API returned success but output is empty")
607
+
600
608
  format_output(
601
609
  {
602
610
  "job_id": result.output.job_id,
@@ -669,8 +677,13 @@ def logs(
669
677
  f"API returned status {result.status_code}: {result.message}",
670
678
  )
671
679
 
680
+ # Validate output is not None before accessing attributes
681
+ logs_data = ""
682
+ if result.output is not None and isinstance(result.output, dict):
683
+ logs_data = result.output.get("logs", "")
684
+
672
685
  format_output(
673
- {"job_id": job_id, "logs": getattr(result.output, "logs", "")},
686
+ {"job_id": job_id, "logs": logs_data},
674
687
  fmt=output_format,
675
688
  )
676
689
  except Exception as e:
@@ -27,7 +27,7 @@ def callback(ctx: typer.Context):
27
27
  typer.echo(ctx.get_help())
28
28
 
29
29
 
30
- @app.command("create")
30
+ @app.command("create", hidden=True)
31
31
  @handle_sdk_error("Code generation request failed")
32
32
  def create(
33
33
  model: str = typer.Option(..., "-m", "--model", help="The model to call"),
@@ -56,7 +56,8 @@ def create(
56
56
  ),
57
57
  n: int = typer.Option(1, "-n", "--n", help="The number of output results"),
58
58
  ):
59
- """Call code generation API."""
59
+ """[DEPRECATED] No independent endpoint available.
60
+ This command is hidden and will be removed."""
60
61
  messages = [UserRoleMessageParam(content=content)]
61
62
  if attachment_meta is not None:
62
63
  try:
@@ -41,17 +41,54 @@ def print_failed_message(rsp):
41
41
  )
42
42
 
43
43
 
44
- def ensure_ok(rsp):
44
+ def ensure_ok(rsp, check_business_error: bool = True):
45
45
  """Return *rsp.output* when the response is OK; otherwise print the error
46
46
  and exit with code 1.
47
47
 
48
48
  This eliminates the repetitive ``if rsp.status_code == OK … else …``
49
49
  pattern that appears in every command handler.
50
+
51
+ Enhanced to check both HTTP status and business-level error codes:
52
+ - HTTP 200 but InvalidParameter → still treated as failure
53
+ - HTTP 4xx/5xx → clear error message
54
+
55
+ Args:
56
+ rsp: The API response object
57
+ check_business_error: If True (default), check for business-level
58
+ error codes in the output. Set to False for
59
+ async task creation where we only care about
60
+ HTTP success, not task execution.
50
61
  """
51
- if rsp.status_code == HTTPStatus.OK:
52
- return rsp.output
53
- print_failed_message(rsp)
54
- raise typer.Exit(1)
62
+ if rsp.status_code != HTTPStatus.OK:
63
+ print_failed_message(rsp)
64
+ raise typer.Exit(1)
65
+
66
+ # Check for business-level errors even when HTTP status is 200
67
+ output = rsp.output
68
+ if output is None:
69
+ print_failed_message(rsp)
70
+ raise typer.Exit(1)
71
+
72
+ # Only check business-level errors if explicitly requested
73
+ if check_business_error:
74
+ # Some APIs return error info in output even with HTTP 200
75
+ if isinstance(output, dict):
76
+ error_code = output.get("code")
77
+ message = output.get("message", "Unknown error")
78
+ else:
79
+ error_code = getattr(output, "code", None)
80
+ message = getattr(output, "message", "Unknown error")
81
+
82
+ if error_code and error_code != "":
83
+ err_console.print(
84
+ f"[red]Business Error[/red] request_id: {rsp.request_id}, "
85
+ f"status_code: {rsp.status_code}, "
86
+ f"code: {error_code}, "
87
+ f"message: {message}",
88
+ )
89
+ raise typer.Exit(1)
90
+
91
+ return output
55
92
 
56
93
 
57
94
  def success(message: str):
@@ -1,6 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  """``deployments`` sub-command group."""
3
3
  import time
4
+ from http import HTTPStatus
4
5
  from typing import Optional
5
6
 
6
7
  import typer
@@ -12,8 +13,10 @@ from dashscope.cli.common import (
12
13
  console,
13
14
  err_console,
14
15
  ensure_ok,
16
+ error,
15
17
  handle_sdk_error,
16
18
  logger,
19
+ print_failed_message,
17
20
  success,
18
21
  )
19
22
 
@@ -37,12 +40,34 @@ def callback(ctx: typer.Context):
37
40
  # ---------------------------------------------------------------------------
38
41
 
39
42
 
40
- def _wait_for_deployment(deployed_model: str):
41
- """Block until the deployment reaches a non-pending state."""
43
+ # ---------------------------------------------------------------------------
44
+ # Constants
45
+ # ---------------------------------------------------------------------------
46
+ DEFAULT_WAIT_TIMEOUT = 3600 # 1 hour default timeout for waiting
47
+
48
+
49
+ def _wait_for_deployment(
50
+ deployed_model: str,
51
+ timeout: int = DEFAULT_WAIT_TIMEOUT,
52
+ ):
53
+ """Block until the deployment reaches a non-pending state or times out."""
54
+ start_time = time.time()
42
55
  try:
43
56
  while True:
57
+ # Check timeout
58
+ elapsed = time.time() - start_time
59
+ if elapsed > timeout:
60
+ err_console.print(
61
+ "[red]Timeout:[/red] Deployment "
62
+ f"{deployed_model} did not complete within "
63
+ f"{timeout} seconds. You can check status later via: "
64
+ f"[cyan]dashscope deployments get {deployed_model}[/cyan]",
65
+ )
66
+ raise typer.Exit(1)
67
+
44
68
  rsp = dashscope.Deployments.get(deployed_model)
45
- output = ensure_ok(rsp)
69
+ # During polling, only check HTTP success, not business errors
70
+ output = ensure_ok(rsp, check_business_error=False)
46
71
  status = output.status
47
72
 
48
73
  if status in (
@@ -67,7 +92,12 @@ def _wait_for_deployment(deployed_model: str):
67
92
 
68
93
  def _print_deployments(output):
69
94
  """Pretty-print a list of deployments from *output*."""
70
- if output is None or not output.deployments:
95
+ if (
96
+ output is None
97
+ or not isinstance(output, dict)
98
+ or "deployments" not in output
99
+ or not output["deployments"]
100
+ ):
71
101
  console.print("There is no deployed model!")
72
102
  return
73
103
  for dep in output.deployments:
@@ -99,15 +129,50 @@ def create(
99
129
  "--capacity",
100
130
  help="The target capacity",
101
131
  ),
132
+ plan: Optional[str] = typer.Option(
133
+ None,
134
+ "--plan",
135
+ help="Deployment plan or template ID",
136
+ ),
137
+ template_id: Optional[str] = typer.Option(
138
+ None,
139
+ "--template-id",
140
+ help="Template ID for deployment configuration",
141
+ ),
102
142
  ):
103
143
  """Create a model deployment."""
104
- rsp = dashscope.Deployments.call(
105
- model=model,
106
- capacity=capacity,
107
- suffix=suffix, # type: ignore[arg-type]
144
+ kwargs = {
145
+ "model": model,
146
+ "capacity": capacity,
147
+ "suffix": suffix,
148
+ }
149
+ if plan is not None:
150
+ kwargs["plan"] = plan
151
+ if template_id is not None:
152
+ kwargs["template_id"] = template_id
153
+
154
+ rsp = dashscope.Deployments.call(**kwargs)
155
+
156
+ # Enhanced error checking: verify both HTTP status and response content
157
+ if rsp.status_code != HTTPStatus.OK:
158
+ print_failed_message(rsp)
159
+ raise typer.Exit(1)
160
+
161
+ output = rsp.output
162
+ if output is None:
163
+ error("Deployment creation returned empty response")
164
+
165
+ deployed_model = (
166
+ output.get("deployed_model")
167
+ if isinstance(output, dict)
168
+ else getattr(output, "deployed_model", None)
108
169
  )
109
- output = ensure_ok(rsp)
110
- deployed_model = output.deployed_model
170
+ if not deployed_model:
171
+ error(
172
+ "Deployment creation succeeded but missing deployed_model "
173
+ f"in response. Response: {output}",
174
+ )
175
+
111
176
  success(f"Create model: {deployed_model} deployment")
112
177
  _wait_for_deployment(deployed_model)
113
178
 
@@ -63,6 +63,7 @@ def upload(
63
63
  file_path = os.path.expanduser(file)
64
64
  if not os.path.exists(file_path):
65
65
  error(f"File {file_path} does not exist")
66
+ return # unreachable, but makes intent clear
66
67
 
67
68
  rsp = dashscope.Files.upload(
68
69
  file_path=file_path,
@@ -71,7 +72,17 @@ def upload(
71
72
  base_address=base_url,
72
73
  )
73
74
  output = ensure_ok(rsp)
74
- file_id = output["uploaded_files"][0]["file_id"]
75
+
76
+ # Validate uploaded_files exists and is not empty
77
+ uploaded_files = (
78
+ output.get("uploaded_files", [])
79
+ if isinstance(output, dict)
80
+ else getattr(output, "uploaded_files", [])
81
+ )
82
+ if not uploaded_files:
83
+ error("Upload succeeded but no file_id returned in response")
84
+
85
+ file_id = uploaded_files[0]["file_id"]
75
86
  success(f"Upload success, file id: {file_id}")
76
87
 
77
88
 
@@ -1,6 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  """``fine-tunes`` sub-command group."""
3
3
  import time
4
+ from http import HTTPStatus
4
5
  from typing import Optional, List
5
6
 
6
7
  import typer
@@ -13,6 +14,7 @@ from dashscope.cli.common import (
13
14
  console,
14
15
  err_console,
15
16
  ensure_ok,
17
+ error,
16
18
  handle_sdk_error,
17
19
  logger,
18
20
  print_failed_message,
@@ -39,12 +41,31 @@ def callback(ctx: typer.Context):
39
41
  # ---------------------------------------------------------------------------
40
42
 
41
43
 
42
- def _wait_for_job(job_id: str):
43
- """Block until the fine-tune job reaches a terminal state."""
44
+ # ---------------------------------------------------------------------------
45
+ # Constants
46
+ # ---------------------------------------------------------------------------
47
+ DEFAULT_WAIT_TIMEOUT = 3600 # 1 hour default timeout for waiting
48
+
49
+
50
+ def _wait_for_job(job_id: str, timeout: int = DEFAULT_WAIT_TIMEOUT):
51
+ """Block until the fine-tune job reaches a terminal state or times out."""
52
+ start_time = time.time()
44
53
  try:
45
54
  while True:
55
+ # Check timeout
56
+ elapsed = time.time() - start_time
57
+ if elapsed > timeout:
58
+ err_console.print(
59
+ "[red]Timeout:[/red] Job "
60
+ f"{job_id} did not complete within "
61
+ f"{timeout} seconds. You can check status later via: "
62
+ f"[cyan]dashscope fine-tunes get {job_id}[/cyan]",
63
+ )
64
+ raise typer.Exit(1)
65
+
46
66
  rsp = dashscope.FineTunes.get(job_id)
47
- output = ensure_ok(rsp)
67
+ # During polling, only check HTTP success, not business errors
68
+ output = ensure_ok(rsp, check_business_error=False)
48
69
  status = output.status
49
70
 
50
71
  if status == TaskStatus.FAILED:
@@ -86,12 +107,25 @@ def _stream_events(job_id: str):
86
107
  print_failed_message(rsp)
87
108
  return
88
109
 
89
- if rsp.output.status in (
110
+ # Validate output is not None and is a dict before accessing
111
+ if rsp.output is None or not isinstance(rsp.output, dict):
112
+ err_console.print(
113
+ f"[red]Error:[/red] Invalid response for job {job_id}. "
114
+ f"Request ID: {rsp.request_id}",
115
+ )
116
+ return
117
+
118
+ status = (
119
+ rsp.output.get("status")
120
+ if isinstance(rsp.output, dict)
121
+ else getattr(rsp.output, "status", None)
122
+ )
123
+ if status in (
90
124
  TaskStatus.FAILED,
91
125
  TaskStatus.CANCELED,
92
126
  TaskStatus.SUCCEEDED,
93
127
  ):
94
- console.print(f"Fine-tune job: {job_id} is {rsp.output.status}")
128
+ console.print(f"Fine-tune job: {job_id} is {status}")
95
129
  _dump_logs(job_id)
96
130
  return
97
131
 
@@ -120,9 +154,16 @@ def _dump_logs(job_id: str):
120
154
  line=LOG_PAGE_SIZE,
121
155
  )
122
156
  output = ensure_ok(rsp)
123
- for line in output.logs:
157
+ logs = (
158
+ output.get("logs", [])
159
+ if isinstance(output, dict)
160
+ else getattr(output, "logs", [])
161
+ )
162
+ if not logs:
163
+ break
164
+ for line in logs:
124
165
  console.print(line, highlight=False)
125
- if len(output.logs) < LOG_PAGE_SIZE:
166
+ if len(logs) < LOG_PAGE_SIZE:
126
167
  break
127
168
  offset += LOG_PAGE_SIZE
128
169
 
@@ -201,8 +242,23 @@ def create(
201
242
  mode=mode, # type: ignore[arg-type]
202
243
  hyper_parameters=params if params else None, # type: ignore[arg-type]
203
244
  )
204
- output = ensure_ok(rsp)
205
- job_id = output.job_id
245
+
246
+ # Enhanced error checking with detailed validation
247
+ if rsp.status_code != HTTPStatus.OK:
248
+ print_failed_message(rsp)
249
+ raise typer.Exit(1)
250
+
251
+ output = rsp.output
252
+ if output is None:
253
+ error("Fine-tune creation returned empty response")
254
+
255
+ job_id = getattr(output, "job_id", None)
256
+ if not job_id:
257
+ error(
258
+ "Fine-tune creation succeeded but missing job_id in response. "
259
+ f"Response: {output}",
260
+ )
261
+
206
262
  success(f"Create fine-tune job success, job_id: {job_id}")
207
263
  _wait_for_job(job_id)
208
264
 
@@ -60,7 +60,8 @@ def create(
60
60
  n=n,
61
61
  size=size,
62
62
  )
63
- output = ensure_ok(response)
63
+ # For async task creation, only check HTTP success, not business errors
64
+ output = ensure_ok(response, check_business_error=False)
64
65
  console.print_json(json.dumps(output, ensure_ascii=False))
65
66
  usage = getattr(response, "usage", None)
66
67
  if usage:
@@ -1,12 +1,18 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  """``speech-synthesis`` sub-command group."""
3
3
  import json
4
+ from http import HTTPStatus
4
5
  from typing import Optional
5
6
 
6
7
  import typer
7
8
 
8
9
  import dashscope
9
- from dashscope.cli.common import console, handle_sdk_error
10
+ from dashscope.cli.common import (
11
+ console,
12
+ error,
13
+ handle_sdk_error,
14
+ print_failed_message,
15
+ )
10
16
 
11
17
  app = typer.Typer(
12
18
  name="speech-synthesis",
@@ -75,6 +81,18 @@ def create(
75
81
  rate=rate,
76
82
  pitch=pitch,
77
83
  )
84
+
85
+ # Validate response status and required fields
86
+ if (
87
+ not hasattr(result, "status_code")
88
+ or result.status_code != HTTPStatus.OK
89
+ ):
90
+ print_failed_message(result)
91
+ raise typer.Exit(1)
92
+
93
+ if not result.audio_url:
94
+ error("Speech synthesis succeeded but missing audio_url in response")
95
+
78
96
  output = {
79
97
  "audio_url": result.audio_url,
80
98
  "audio_id": result.audio_id,
@@ -93,7 +93,9 @@ def create(
93
93
  special_word_filter=special_word_filter,
94
94
  audio_event_detection_enabled=audio_event_detection_enabled,
95
95
  )
96
- output = ensure_ok(response)
96
+ # For async task creation, only check HTTP success, not business errors
97
+ # Business errors will be reported when fetching/waiting for task results
98
+ output = ensure_ok(response, check_business_error=False)
97
99
  console.print_json(json.dumps(output, ensure_ascii=False))
98
100
  usage = getattr(response, "usage", None)
99
101
  if usage:
@@ -23,7 +23,7 @@ def callback(ctx: typer.Context):
23
23
  typer.echo(ctx.get_help())
24
24
 
25
25
 
26
- @app.command("create")
26
+ @app.command("create", hidden=True)
27
27
  @handle_sdk_error("Understanding request failed")
28
28
  def create(
29
29
  model: str = typer.Option(..., "-m", "--model", help="The model to call"),
@@ -46,7 +46,8 @@ def create(
46
46
  help="Task type, such as extraction or classification",
47
47
  ),
48
48
  ):
49
- """Call natural language understanding API."""
49
+ """[DEPRECATED] OpenNLU endpoint is offline.
50
+ This command is hidden and will be removed."""
50
51
  response = dashscope.Understanding.call(
51
52
  model=model,
52
53
  sentence=sentence,
@@ -104,7 +104,9 @@ def create(
104
104
  resolution=resolution,
105
105
  ratio=ratio,
106
106
  )
107
- output = ensure_ok(response)
107
+ # For async task creation, only check HTTP success, not business errors
108
+ # Business errors will be reported when fetching/waiting for task results
109
+ output = ensure_ok(response, check_business_error=False)
108
110
  console.print_json(json.dumps(output, ensure_ascii=False))
109
111
  usage = getattr(response, "usage", None)
110
112
  if usage:
@@ -43,6 +43,7 @@ class ModelProtocol(str, Enum):
43
43
 
44
44
  OPENAI = "openai"
45
45
  ANTHROPIC = "anthropic"
46
+ DASHSCOPE = "dashscope"
46
47
 
47
48
 
48
49
  # ========================================================================== #
@@ -1,4 +1,4 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # Copyright (c) Alibaba, Inc. and its affiliates.
3
3
 
4
- __version__ = "1.26.2"
4
+ __version__ = "1.26.3"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dashscope
3
- Version: 1.26.2
3
+ Version: 1.26.3
4
4
  Summary: dashscope client sdk library
5
5
  Home-page: https://dashscope.aliyun.com/
6
6
  Author: Alibaba Cloud
@@ -20,6 +20,8 @@ Requires-Python: >=3.8.0
20
20
  Description-Content-Type: text/markdown
21
21
  Provides-Extra: tokenizer
22
22
  License-File: LICENSE
23
+ License-File: LICENSE.certifi
24
+ License-File: NOTICE
23
25
 
24
26
  # DashScope Python SDK
25
27
 
@@ -1,5 +1,7 @@
1
1
  LICENSE
2
+ LICENSE.certifi
2
3
  MANIFEST.in
4
+ NOTICE
3
5
  README.md
4
6
  setup.cfg
5
7
  setup.py