dashscope 2.0.4__tar.gz → 2.1.0__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.
- {dashscope-2.0.4 → dashscope-2.1.0}/MANIFEST.in +0 -1
- {dashscope-2.0.4 → dashscope-2.1.0}/PKG-INFO +88 -13
- {dashscope-2.0.4 → dashscope-2.1.0}/README.md +85 -4
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/__init__.py +33 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/_config.py +75 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/_logging.py +23 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/sessions.py +45 -3
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/agentstudio/types/__init__.py +1 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/agentstudio/types/models.py +47 -15
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/agentstudio/types/params.py +9 -3
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/agentic_rl.py +11 -2
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/__init__.py +4 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/common/constants.py +36 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/common/model.py +188 -45
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/common/model_types.py +10 -1
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/common/utils.py +126 -51
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/func_manager.py +11 -4
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/processor/abstract_reward_processor.py +14 -2
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/server/server.py +106 -34
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/app.py +2 -2
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/main.py +8 -6
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/client.py +16 -0
- dashscope-2.1.0/dashscope/devkit/__init__.py +75 -0
- dashscope-2.1.0/dashscope/devkit/diagnosis.py +536 -0
- dashscope-2.1.0/dashscope/devkit/mock.py +910 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/errors.py +128 -6
- dashscope-2.1.0/dashscope/expert.py +151 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/audio/tts/speech_synthesizer.py +8 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/cli/__init__.py +6 -4
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/protocols/anthropic.py +131 -44
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/protocols/base.py +32 -2
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/protocols/native.py +20 -3
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/protocols/openai.py +79 -27
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/resources/_jobs.py +429 -78
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/resources/_oss_upload.py +5 -2
- dashscope-2.1.0/dashscope/resources/_sse.py +124 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/resources/apps.py +356 -26
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/resources/audio/__init__.py +69 -2
- dashscope-2.1.0/dashscope/resources/audio/_ws_session.py +292 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/resources/audio/asr.py +289 -7
- dashscope-2.1.0/dashscope/resources/audio/customization.py +1470 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/resources/audio/http_tts.py +314 -56
- dashscope-2.1.0/dashscope/resources/audio/live.py +724 -0
- dashscope-2.1.0/dashscope/resources/audio/phrases.py +580 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/resources/audio/realtime.py +169 -153
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/resources/chat/completions.py +328 -33
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/resources/decision.py +151 -8
- dashscope-2.1.0/dashscope/resources/deployments.py +1189 -0
- dashscope-2.1.0/dashscope/resources/embeddings.py +1022 -0
- dashscope-2.1.0/dashscope/resources/files.py +1011 -0
- dashscope-2.1.0/dashscope/resources/fine_tunes.py +1589 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/resources/images.py +577 -21
- dashscope-2.1.0/dashscope/resources/models.py +558 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/resources/multimodal/chat.py +172 -9
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/resources/multimodal/embeddings.py +32 -3
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/resources/reinforcement_learning.py +242 -18
- dashscope-2.1.0/dashscope/resources/rerank.py +340 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/resources/tingwu.py +175 -26
- dashscope-2.1.0/dashscope/resources/tokenization.py +302 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/resources/videos.py +513 -5
- dashscope-2.1.0/dashscope/transport/__init__.py +19 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/transport/_ident.py +42 -7
- dashscope-2.1.0/dashscope/transport/_options.py +160 -0
- dashscope-2.1.0/dashscope/transport/_response.py +209 -0
- dashscope-2.1.0/dashscope/transport/http.py +1190 -0
- dashscope-2.1.0/dashscope/transport/sse.py +289 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/transport/ws.py +66 -11
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/transport/ws_connection.py +62 -12
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/types/__init__.py +2 -0
- dashscope-2.1.0/dashscope/types/_parse.py +513 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/types/common.py +47 -3
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/types/completions.py +97 -24
- dashscope-2.1.0/dashscope/types/pagination.py +225 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/version.py +1 -1
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope.egg-info/PKG-INFO +88 -13
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope.egg-info/SOURCES.txt +27 -145
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope.egg-info/requires.txt +2 -12
- dashscope-2.1.0/examples/01_atomic_capabilities/audio/realtime_live.py +119 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/03_agent_recipes/mcp_server_demo/README.md +1 -2
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/03_agent_recipes/mcp_server_demo/server.py +2 -3
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/README.md +1 -1
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/README_zh.md +1 -1
- {dashscope-2.0.4 → dashscope-2.1.0}/setup.py +3 -11
- dashscope-2.1.0/tests/test_agentic_rl_datasets_upload.py +168 -0
- dashscope-2.1.0/tests/test_agentic_rl_fc_errors.py +264 -0
- dashscope-2.1.0/tests/test_agentic_rl_review_regressions.py +336 -0
- dashscope-2.1.0/tests/test_agentic_rl_script.py +107 -0
- dashscope-2.1.0/tests/test_agentic_rl_server_hardening.py +460 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_agentstudio_models.py +101 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_audio.py +7 -4
- dashscope-2.1.0/tests/test_audio_live_session.py +1880 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_audio_management.py +143 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_audio_samples_direct_call.py +3 -2
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_audio_tts_http.py +476 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_audio_tts_realtime.py +426 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_audio_ws_integration.py +62 -0
- dashscope-2.1.0/tests/test_audio_ws_session.py +814 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_config.py +156 -0
- dashscope-2.1.0/tests/test_devkit_diagnosis.py +227 -0
- dashscope-2.1.0/tests/test_devkit_mock.py +552 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_errors.py +114 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_files_models.py +95 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_images_videos.py +90 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_jobs.py +67 -1
- dashscope-2.1.0/tests/test_layer_decoupling.py +277 -0
- dashscope-2.1.0/tests/test_logging.py +734 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_multimodal.py +200 -0
- dashscope-2.1.0/tests/test_pagination.py +471 -0
- dashscope-2.1.0/tests/test_parse_model.py +457 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_protocols.py +176 -1
- dashscope-2.1.0/tests/test_request_options.py +503 -0
- dashscope-2.1.0/tests/test_resource_request_options.py +1029 -0
- dashscope-2.1.0/tests/test_response.py +354 -0
- dashscope-2.1.0/tests/test_response_drift.py +1192 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_settings.py +39 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_tools_resources.py +119 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_transport.py +158 -1
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_ws_connection.py +538 -5
- dashscope-2.0.4/dashscope/acli/__init__.py +0 -24
- dashscope-2.0.4/dashscope/acli/__main__.py +0 -7
- dashscope-2.0.4/dashscope/acli/acceptance.py +0 -355
- dashscope-2.0.4/dashscope/acli/agent.py +0 -1931
- dashscope-2.0.4/dashscope/acli/agents/__init__.py +0 -2
- dashscope-2.0.4/dashscope/acli/agents/delegate.py +0 -379
- dashscope-2.0.4/dashscope/acli/agents/subagent.py +0 -317
- dashscope-2.0.4/dashscope/acli/agents/subagents.py +0 -357
- dashscope-2.0.4/dashscope/acli/audit.py +0 -252
- dashscope-2.0.4/dashscope/acli/capabilities/__init__.py +0 -102
- dashscope-2.0.4/dashscope/acli/capabilities/local_memory.py +0 -92
- dashscope-2.0.4/dashscope/acli/cli/__init__.py +0 -250
- dashscope-2.0.4/dashscope/acli/cli/completer.py +0 -316
- dashscope-2.0.4/dashscope/acli/cli/constants.py +0 -320
- dashscope-2.0.4/dashscope/acli/cli/dispatch.py +0 -560
- dashscope-2.0.4/dashscope/acli/cli/examples.py +0 -510
- dashscope-2.0.4/dashscope/acli/cli/handlers_capability.py +0 -306
- dashscope-2.0.4/dashscope/acli/cli/handlers_config.py +0 -850
- dashscope-2.0.4/dashscope/acli/cli/handlers_device.py +0 -432
- dashscope-2.0.4/dashscope/acli/cli/handlers_key.py +0 -318
- dashscope-2.0.4/dashscope/acli/cli/handlers_misc.py +0 -328
- dashscope-2.0.4/dashscope/acli/cli/handlers_profile.py +0 -272
- dashscope-2.0.4/dashscope/acli/cli/handlers_provider.py +0 -357
- dashscope-2.0.4/dashscope/acli/cli/handlers_session.py +0 -213
- dashscope-2.0.4/dashscope/acli/cli/handlers_setup.py +0 -311
- dashscope-2.0.4/dashscope/acli/cli/handlers_skill.py +0 -373
- dashscope-2.0.4/dashscope/acli/cli/mcp.py +0 -179
- dashscope-2.0.4/dashscope/acli/cli/multimodal.py +0 -279
- dashscope-2.0.4/dashscope/acli/cli/repl.py +0 -617
- dashscope-2.0.4/dashscope/acli/cli/runners.py +0 -567
- dashscope-2.0.4/dashscope/acli/cli/startup.py +0 -197
- dashscope-2.0.4/dashscope/acli/cli/streaming.py +0 -360
- dashscope-2.0.4/dashscope/acli/commands.py +0 -237
- dashscope-2.0.4/dashscope/acli/compression.py +0 -364
- dashscope-2.0.4/dashscope/acli/config.py +0 -906
- dashscope-2.0.4/dashscope/acli/debuglog.py +0 -29
- dashscope-2.0.4/dashscope/acli/deliverable.py +0 -171
- dashscope-2.0.4/dashscope/acli/dev.py +0 -1294
- dashscope-2.0.4/dashscope/acli/eval/__init__.py +0 -248
- dashscope-2.0.4/dashscope/acli/examples/basic-chat/.acli/config.toml +0 -4
- dashscope-2.0.4/dashscope/acli/examples/basic-chat/.acli/custom-extensions.toml +0 -201
- dashscope-2.0.4/dashscope/acli/examples/basic-chat/.acli/hooks.toml +0 -101
- dashscope-2.0.4/dashscope/acli/examples/basic-chat/.acli/skills/explain-code.md +0 -17
- dashscope-2.0.4/dashscope/acli/examples/basic-chat/.acli/skills/research-topic.md +0 -19
- dashscope-2.0.4/dashscope/acli/examples/basic-chat/.acli/skills/translate.md +0 -15
- dashscope-2.0.4/dashscope/acli/examples/basic-chat/.acli/skills/write-poem.md +0 -11
- dashscope-2.0.4/dashscope/acli/examples/basic-chat/.acli/system-prompt.md +0 -26
- dashscope-2.0.4/dashscope/acli/examples/basic-chat/README.md +0 -112
- dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/config.toml +0 -5
- dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/custom-extensions.toml +0 -23
- dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/hooks.toml +0 -25
- dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/agent.md +0 -161
- dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/api-doc.md +0 -19
- dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/cli.md +0 -102
- dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/diagnose.md +0 -15
- dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/error-code.md +0 -77
- dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/explain-code.md +0 -9
- dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/fine-tuning.md +0 -166
- dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/multimodal.md +0 -223
- dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/retrieval.md +0 -243
- dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/sdk-example.md +0 -20
- dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/speech.md +0 -201
- dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/text-generation.md +0 -209
- dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/translate.md +0 -9
- dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/.acli/system-prompt.md +0 -116
- dashscope-2.0.4/dashscope/acli/examples/dashscope-sdk-expert/README.md +0 -117
- dashscope-2.0.4/dashscope/acli/executor.py +0 -674
- dashscope-2.0.4/dashscope/acli/expert.py +0 -143
- dashscope-2.0.4/dashscope/acli/extensions.py +0 -1304
- dashscope-2.0.4/dashscope/acli/hooks.py +0 -426
- dashscope-2.0.4/dashscope/acli/mcp_server.py +0 -169
- dashscope-2.0.4/dashscope/acli/mcp_stdio.py +0 -313
- dashscope-2.0.4/dashscope/acli/memory/__init__.py +0 -2
- dashscope-2.0.4/dashscope/acli/memory/directives_learning.py +0 -268
- dashscope-2.0.4/dashscope/acli/memory/experience.py +0 -175
- dashscope-2.0.4/dashscope/acli/memory/manager.py +0 -172
- dashscope-2.0.4/dashscope/acli/memory/plan.py +0 -111
- dashscope-2.0.4/dashscope/acli/memory/reflection.py +0 -839
- dashscope-2.0.4/dashscope/acli/memory/skill_evolution.py +0 -250
- dashscope-2.0.4/dashscope/acli/memory/tool_chains.py +0 -198
- dashscope-2.0.4/dashscope/acli/memory/trace.py +0 -208
- dashscope-2.0.4/dashscope/acli/permission.py +0 -141
- dashscope-2.0.4/dashscope/acli/platforms/__init__.py +0 -74
- dashscope-2.0.4/dashscope/acli/platforms/bailian/__init__.py +0 -15
- dashscope-2.0.4/dashscope/acli/platforms/bailian/cli.py +0 -178
- dashscope-2.0.4/dashscope/acli/platforms/bailian/mcp.py +0 -303
- dashscope-2.0.4/dashscope/acli/platforms/base.py +0 -309
- dashscope-2.0.4/dashscope/acli/platforms/local/__init__.py +0 -6
- dashscope-2.0.4/dashscope/acli/platforms/local/history.py +0 -319
- dashscope-2.0.4/dashscope/acli/platforms/local/memory.py +0 -235
- dashscope-2.0.4/dashscope/acli/prompt.py +0 -202
- dashscope-2.0.4/dashscope/acli/prompt_pipeline.py +0 -316
- dashscope-2.0.4/dashscope/acli/providers/__init__.py +0 -156
- dashscope-2.0.4/dashscope/acli/providers/adapter.py +0 -331
- dashscope-2.0.4/dashscope/acli/providers/anthropic.py +0 -397
- dashscope-2.0.4/dashscope/acli/providers/base.py +0 -49
- dashscope-2.0.4/dashscope/acli/providers/hardening.py +0 -302
- dashscope-2.0.4/dashscope/acli/providers/openai.py +0 -282
- dashscope-2.0.4/dashscope/acli/providers/profile.py +0 -307
- dashscope-2.0.4/dashscope/acli/providers/tongyi.py +0 -823
- dashscope-2.0.4/dashscope/acli/runtime.py +0 -115
- dashscope-2.0.4/dashscope/acli/sandbox.py +0 -181
- dashscope-2.0.4/dashscope/acli/scheduler.py +0 -643
- dashscope-2.0.4/dashscope/acli/sdk.py +0 -217
- dashscope-2.0.4/dashscope/acli/session.py +0 -566
- dashscope-2.0.4/dashscope/acli/session_events.py +0 -261
- dashscope-2.0.4/dashscope/acli/skills/__init__.py +0 -35
- dashscope-2.0.4/dashscope/acli/skills/base.py +0 -271
- dashscope-2.0.4/dashscope/acli/skills/manager.py +0 -175
- dashscope-2.0.4/dashscope/acli/skills/package.py +0 -253
- dashscope-2.0.4/dashscope/acli/skills/store.py +0 -589
- dashscope-2.0.4/dashscope/acli/tools/__init__.py +0 -6
- dashscope-2.0.4/dashscope/acli/tools/browser.py +0 -494
- dashscope-2.0.4/dashscope/acli/tools/camera.py +0 -39
- dashscope-2.0.4/dashscope/acli/tools/checkpoint.py +0 -220
- dashscope-2.0.4/dashscope/acli/tools/evolution.py +0 -83
- dashscope-2.0.4/dashscope/acli/tools/filesystem.py +0 -437
- dashscope-2.0.4/dashscope/acli/tools/platform.py +0 -555
- dashscope-2.0.4/dashscope/acli/tools/registry.py +0 -497
- dashscope-2.0.4/dashscope/acli/tools/session.py +0 -412
- dashscope-2.0.4/dashscope/acli/tools/shell.py +0 -950
- dashscope-2.0.4/dashscope/acli/tools/skills.py +0 -80
- dashscope-2.0.4/dashscope/acli/tools/vision.py +0 -674
- dashscope-2.0.4/dashscope/acli/tools/web_search.py +0 -193
- dashscope-2.0.4/dashscope/acli/ui/__init__.py +0 -2
- dashscope-2.0.4/dashscope/acli/ui/camera.py +0 -208
- dashscope-2.0.4/dashscope/acli/ui/embedded.py +0 -131
- dashscope-2.0.4/dashscope/acli/ui/tts.py +0 -662
- dashscope-2.0.4/dashscope/acli/ui/tui.py +0 -3182
- dashscope-2.0.4/dashscope/acli/ui/voice.py +0 -483
- dashscope-2.0.4/dashscope/acli/utils/__init__.py +0 -98
- dashscope-2.0.4/dashscope/acli/utils/clipboard.py +0 -43
- dashscope-2.0.4/dashscope/acli/utils/crypto.py +0 -67
- dashscope-2.0.4/dashscope/acli/utils/exceptions.py +0 -19
- dashscope-2.0.4/dashscope/acli/utils/ids.py +0 -37
- dashscope-2.0.4/dashscope/acli/utils/images.py +0 -31
- dashscope-2.0.4/dashscope/acli/utils/keywords.py +0 -52
- dashscope-2.0.4/dashscope/acli/utils/messages.py +0 -200
- dashscope-2.0.4/dashscope/acli/utils/paths.py +0 -142
- dashscope-2.0.4/dashscope/acli/utils/sanitizer.py +0 -104
- dashscope-2.0.4/dashscope/acli/utils/spinner.py +0 -108
- dashscope-2.0.4/dashscope/acli/utils/template.py +0 -31
- dashscope-2.0.4/dashscope/acli/utils/text.py +0 -140
- dashscope-2.0.4/dashscope/acli/utils/toml.py +0 -111
- dashscope-2.0.4/dashscope/acli/utils/validation.py +0 -116
- dashscope-2.0.4/dashscope/resources/_sse.py +0 -78
- dashscope-2.0.4/dashscope/resources/audio/customization.py +0 -615
- dashscope-2.0.4/dashscope/resources/audio/phrases.py +0 -254
- dashscope-2.0.4/dashscope/resources/deployments.py +0 -455
- dashscope-2.0.4/dashscope/resources/embeddings.py +0 -429
- dashscope-2.0.4/dashscope/resources/files.py +0 -400
- dashscope-2.0.4/dashscope/resources/fine_tunes.py +0 -698
- dashscope-2.0.4/dashscope/resources/models.py +0 -229
- dashscope-2.0.4/dashscope/resources/rerank.py +0 -168
- dashscope-2.0.4/dashscope/resources/tokenization.py +0 -142
- dashscope-2.0.4/dashscope/transport/__init__.py +0 -11
- dashscope-2.0.4/dashscope/transport/http.py +0 -641
- dashscope-2.0.4/dashscope/transport/sse.py +0 -156
- dashscope-2.0.4/tests/test_logging.py +0 -199
- {dashscope-2.0.4 → dashscope-2.1.0}/LICENSE +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/LICENSE.certifi +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/NOTICE +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/__init__.pyi +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/_error_registry.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/_quickstart.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/_shared/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/_shared/_errors.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/_shared/_sdk_ident.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/_shared/_sdk_session.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/_shared/_validation.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/agentstudio/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/agentstudio/client.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/agentstudio/constants.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/agentstudio/exceptions.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/agentstudio/pagination.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/_helpers.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/agents.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/deployments.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/environments.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/files.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/memory_stores.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/security.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/session_events.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/session_resources.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/session_threads.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/skills.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/vaults.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/webhook_endpoints.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/agentstudio/streaming.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/agentstudio/transport.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/_submit.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/common/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/common/_legacy_errors.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/common/errors.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/common/log.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/data/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/data/base_data_model.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/data/group_reward_input.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/data/group_reward_output.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/data/reward_input.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/data/reward_output.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/data/rollout_input.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/data/rollout_output.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/demo/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/demo/group_reward_processor_demo.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/demo/reward_processor_demo.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/demo/rollout_processor_demo.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/func_decorator.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/observability/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/observability/genai/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/observability/genai/_core.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/observability/genai/llm_dashscope.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/observability/genai/llm_openai.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/observability/genai/llm_span.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/observability/genai/messages.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/observability/genai/tools.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/observability/processor_span.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/observability/tracing.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/parser/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/parser/base_parser.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/parser/group_reward_parser.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/parser/reward_parser.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/parser/rollout_parser.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/processor/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/processor/abstract_group_reward_processor.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/processor/abstract_processor.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/processor/abstract_rollout_processor.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/finetune/reinforcement/component/server/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/__main__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/commands/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/commands/agentstudio.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/commands/apps.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/commands/audio.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/commands/audio_customization.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/commands/auth.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/commands/chat.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/commands/config.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/commands/decision.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/commands/deployments.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/commands/embeddings.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/commands/files.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/commands/ft.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/commands/images.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/commands/models.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/commands/multimodal.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/commands/oss.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/commands/rerank.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/commands/rl.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/commands/tingwu.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/commands/tokenization.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/commands/videos.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/config_store.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/confirm.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/context.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/errors.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/input.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/output.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/progress.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/cli/sdk.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/_shim.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/agentstudio/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/agentstudio/client.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/agentstudio/exceptions.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/agentstudio/streaming.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/agentstudio/transport.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/aigc/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/aigc/chat_completion.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/aigc/code_generation.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/aigc/conversation.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/aigc/generation.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/aigc/image_generation.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/aigc/image_synthesis.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/aigc/multimodal_conversation.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/aigc/video_synthesis.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/api_entities/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/api_entities/aio_session.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/api_entities/aiohttp_request.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/api_entities/api_request_data.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/api_entities/api_request_factory.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/api_entities/base_request.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/api_entities/chat_completion_types.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/api_entities/dashscope_response.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/api_entities/encryption.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/api_entities/http_request.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/api_entities/websocket_request.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/app/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/app/application.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/app/application_response.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/assistants/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/assistants/assistant_types.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/assistants/assistants.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/assistants/files.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/audio/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/audio/asr/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/audio/asr/asr_phrase_manager.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/audio/asr/recognition.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/audio/asr/transcription.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/audio/asr/translation_recognizer.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/audio/asr/vocabulary.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/audio/http_tts/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/audio/http_tts/http_speech_synthesizer.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/audio/qwen_asr/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/audio/qwen_asr/qwen_transcription.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/audio/qwen_omni/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/audio/qwen_omni/omni_realtime.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/audio/qwen_tts/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/audio/qwen_tts/speech_synthesizer.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/audio/qwen_tts_realtime/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/audio/qwen_tts_realtime/qwen_tts_realtime.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/audio/tts/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/audio/tts_v2/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/audio/tts_v2/enrollment.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/audio/tts_v2/speech_synthesizer.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/cli/__main__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/cli/agentic_rl.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/cli/application.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/cli/auth.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/cli/code_generation.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/cli/common.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/cli/deployments.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/cli/embeddings.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/cli/files.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/cli/fine_tunes.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/cli/generation.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/cli/image_generation.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/cli/image_synthesis.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/cli/models.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/cli/multimodal_conversation.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/cli/multimodal_embedding.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/cli/oss.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/cli/rerank.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/cli/speech_synthesis.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/cli/tokenization.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/cli/transcription.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/cli/understanding.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/cli/video_synthesis.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/client/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/client/base_api.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/common/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/common/_sdk_session.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/common/api_key.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/common/base_type.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/common/constants.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/common/env.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/common/error.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/common/logging.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/common/message_manager.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/common/utils.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/embeddings/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/embeddings/batch_text_embedding.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/embeddings/batch_text_embedding_response.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/embeddings/multimodal_embedding.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/embeddings/text_embedding.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/files.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/finetune/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/finetune/agentic_rl.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/finetune/customize_types.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/finetune/deployments.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/finetune/finetunes.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/finetune/reinforcement/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/finetune/reinforcement/common/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/finetune/reinforcement/common/errors.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/io/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/io/input_output.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/model.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/models.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/multimodal/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/multimodal/dialog_state.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/multimodal/multimodal_constants.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/multimodal/multimodal_dialog.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/multimodal/multimodal_request_params.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/multimodal/tingwu/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/multimodal/tingwu/tingwu.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/multimodal/tingwu/tingwu_realtime.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/nlp/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/nlp/understanding.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/protocol/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/protocol/websocket.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/rerank/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/rerank/text_rerank.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/threads/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/threads/messages/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/threads/messages/files.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/threads/messages/messages.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/threads/runs/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/threads/runs/runs.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/threads/runs/steps.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/threads/thread_types.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/threads/threads.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/tokenizers/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/tokenizers/qwen.tiktoken +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/tokenizers/qwen_tokenizer.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/tokenizers/tokenization.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/tokenizers/tokenizer.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/tokenizers/tokenizer_base.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/utils/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/utils/message_utils.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/utils/oss_utils.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/legacy_1x/utils/param_utils.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/protocols/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/py.typed +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/resources/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/resources/_blocking.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/resources/_oss.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/resources/audio/_callbacks.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/resources/audio/tts.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/resources/chat/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/resources/chat/_params.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/resources/multimodal/__init__.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/transport/_retry.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope/types/messages.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope.egg-info/dependency_links.txt +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope.egg-info/entry_points.txt +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope.egg-info/not-zip-safe +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/dashscope.egg-info/top_level.txt +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/applications/apps.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/README.md +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/_common.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/asr_file.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/asr_http_stream.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/asr_microphone.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/asr_websocket.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/connection_reuse.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/direct_call/_common.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/direct_call/asr_file.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/direct_call/asr_http_stream.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/direct_call/asr_microphone.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/direct_call/asr_websocket.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/direct_call/connection_reuse.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/direct_call/realtime_omni.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/direct_call/realtime_qwen_audio.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/direct_call/realtime_translation.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/direct_call/tts_http.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/direct_call/tts_http_stream.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/direct_call/tts_websocket.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/direct_call/voice_clone.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/realtime_omni.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/realtime_qwen_audio.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/realtime_translation.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/tingwu.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/tts_http.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/tts_http_stream.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/tts_websocket.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/audio/voice_clone.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/decision/decision.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/embeddings/embeddings.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/files/files.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/fine_tuning/fine_tunes.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/fine_tuning/reinforcement_learning.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/image_video_synthesis/images.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/image_video_synthesis/videos.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/models/models.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/multimodal_vision/multimodal_chat.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/rerank/rerank.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/text_generation/chat.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/01_atomic_capabilities/text_generation/tokenization.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/02_advanced_engineering/circuit_breaker_retry.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/02_advanced_engineering/client_side_cache.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/02_advanced_engineering/local_mock_debugging.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/03_agent_recipes/agentstudio.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/03_agent_recipes/agentstudio_deployments.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/03_agent_recipes/mcp_server_demo/client_demo.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/03_agent_recipes/rag_expert_system.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/03_agent_recipes/tool_call_loop.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/04_real_world_scenarios/README.md +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/04_real_world_scenarios/README_zh.md +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/04_real_world_scenarios/customer_service_assistant.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/04_real_world_scenarios/production_ready_rag_harness.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/04_real_world_scenarios/realtime_audio_meeting_harness.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/04_real_world_scenarios/ticket_triage_harness.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/05_cli/cli_ci_harness.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/05_cli/cli_output_and_errors.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/aio_generation/basic.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/aio_generation/custom_session.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/aio_generation/deep_research.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/aio_generation/reasoning.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/aio_generation/tool_calls.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/aio_image_synthesis.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/aio_multimodal_conversation/asr.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/aio_multimodal_conversation/image.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/aio_multimodal_conversation/ocr.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/aio_multimodal_conversation/tool_calls.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/aio_video_synthesis.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/application.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/assistant_api.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/assistant_api_file.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/assistant_api_simple.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/cv_models.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/generation/basic.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/generation/custom_session.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/generation/deep_research.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/generation/reasoning.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/generation/tool_calls.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/image_generation.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/image_synthesis.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/multimodal_conversation/asr.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/multimodal_conversation/image.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/multimodal_conversation/ocr.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/multimodal_conversation/reasoning.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/multimodal_conversation/tool_calls.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/multimodal_conversation/video.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/multimodal_embedding.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/qwen_asr.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/qwen_tts.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/set_region_example.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/text_rerank.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/tingwu_realtime.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/tingwu_usages.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/examples/legacy_1x/video_synthesis.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/requirements.txt +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/setup.cfg +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_agentstudio_errors.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_agentstudio_protocol.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_agentstudio_shim.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_apps.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_audio_connection.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_audio_omni_session.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_audio_samples.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_audio_tts_session.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_base_url_routing.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_chat.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_chat_params.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_decision.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_error_registry.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_finetune_deployments.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_finetune_rl_shim.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_http_pool.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_legacy_import_aliases.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_oss_upload.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_package_root.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_rl.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_sse.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_sse_comprehensive_verify.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_tingwu.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_types_messages.py +0 -0
- {dashscope-2.0.4 → dashscope-2.1.0}/tests/test_user_agent_suffix.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dashscope
|
|
3
|
-
Version: 2.0
|
|
3
|
+
Version: 2.1.0
|
|
4
4
|
Summary: dashscope client sdk library
|
|
5
5
|
Home-page: https://dashscope.aliyun.com/
|
|
6
6
|
Author: Alibaba Cloud
|
|
@@ -42,10 +42,7 @@ Requires-Dist: fastapi>=0.100
|
|
|
42
42
|
Requires-Dist: uvicorn>=0.20
|
|
43
43
|
Requires-Dist: opentelemetry-sdk>=1.20
|
|
44
44
|
Provides-Extra: acli
|
|
45
|
-
Requires-Dist:
|
|
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"
|
|
45
|
+
Requires-Dist: dashscope-agenticx[tui]<2,>=1.0.0; extra == "acli"
|
|
49
46
|
Provides-Extra: acli-anthropic
|
|
50
47
|
Requires-Dist: anthropic<2,>=0.40; extra == "acli-anthropic"
|
|
51
48
|
Provides-Extra: acli-openai
|
|
@@ -56,10 +53,7 @@ Requires-Dist: numpy>=1.20; extra == "acli-voice"
|
|
|
56
53
|
Provides-Extra: acli-camera
|
|
57
54
|
Requires-Dist: opencv-python-headless>=4.5; extra == "acli-camera"
|
|
58
55
|
Provides-Extra: acli-all
|
|
59
|
-
Requires-Dist:
|
|
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"
|
|
56
|
+
Requires-Dist: dashscope-agenticx[tui]<2,>=1.0.0; extra == "acli-all"
|
|
63
57
|
Requires-Dist: anthropic<2,>=0.40; extra == "acli-all"
|
|
64
58
|
Requires-Dist: openai<4,>=1.30; extra == "acli-all"
|
|
65
59
|
Requires-Dist: sounddevice>=0.4; extra == "acli-all"
|
|
@@ -107,7 +101,7 @@ The DashScope Python SDK is the official client for [Alibaba Cloud Model Studio
|
|
|
107
101
|
pip install -U dashscope
|
|
108
102
|
```
|
|
109
103
|
|
|
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
|
|
104
|
+
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
105
|
|
|
112
106
|
| Extra | Provides | Install |
|
|
113
107
|
|-------|----------|---------|
|
|
@@ -264,6 +258,82 @@ resp.request_id
|
|
|
264
258
|
|
|
265
259
|
All responses share a common envelope: `request_id`, `status_code`, `code`, `message`, `is_error`, and raw `headers`.
|
|
266
260
|
|
|
261
|
+
### Pagination
|
|
262
|
+
|
|
263
|
+
List endpoints return a page object you can iterate and advance instead of looping `page_no` by hand:
|
|
264
|
+
|
|
265
|
+
```python
|
|
266
|
+
page = client.models.list(page_no=1, page_size=10)
|
|
267
|
+
|
|
268
|
+
for model in page: # this page's items
|
|
269
|
+
...
|
|
270
|
+
page.total_count # catalog total, as reported by the gateway
|
|
271
|
+
page.has_next_page()
|
|
272
|
+
page.next_page() # None on the last page
|
|
273
|
+
|
|
274
|
+
for page in client.models.list(page_size=50).iter_pages(): # every page
|
|
275
|
+
...
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
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.
|
|
279
|
+
|
|
280
|
+
Serialize a page with `model_dump()`. Iterating a page yields its *items*, so `dict(page)` is not a way to read its fields.
|
|
281
|
+
|
|
282
|
+
`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.
|
|
283
|
+
|
|
284
|
+
### Raw responses
|
|
285
|
+
|
|
286
|
+
Pass `raw=True` to get the response object itself, before any error check:
|
|
287
|
+
|
|
288
|
+
```python
|
|
289
|
+
resp = client.models.list(raw=True)
|
|
290
|
+
|
|
291
|
+
resp.status_code
|
|
292
|
+
resp.headers # includes non-standard gateway headers
|
|
293
|
+
resp.request_id
|
|
294
|
+
resp.elapsed
|
|
295
|
+
resp.json() # decoded body
|
|
296
|
+
resp.parse(ModelList) # typed model, memoized per type
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
`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.
|
|
300
|
+
|
|
301
|
+
`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:
|
|
302
|
+
|
|
303
|
+
```python
|
|
304
|
+
from dashscope.resources.models import ModelList, Model
|
|
305
|
+
from dashscope.resources.files import FileList, File
|
|
306
|
+
from dashscope.resources._jobs import Job, JobList
|
|
307
|
+
from dashscope.resources.embeddings import EmbeddingResponse
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
`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.
|
|
311
|
+
|
|
312
|
+
### Per-request options
|
|
313
|
+
|
|
314
|
+
Every resource method that makes an HTTP request takes the same three escape hatches, for anything this SDK does not model yet:
|
|
315
|
+
|
|
316
|
+
```python
|
|
317
|
+
client.chat.completions.create(
|
|
318
|
+
model="qwen-plus",
|
|
319
|
+
messages=["hi"],
|
|
320
|
+
extra_headers={"x-gateway-experiment": "on"},
|
|
321
|
+
extra_query={"debug": "1"},
|
|
322
|
+
extra_body={"parameters": {"top_k": 5}},
|
|
323
|
+
)
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
`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.
|
|
327
|
+
|
|
328
|
+
`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:
|
|
329
|
+
|
|
330
|
+
```python
|
|
331
|
+
client.deployments.list(max_retries=0) # one attempt, no retry
|
|
332
|
+
client.with_options(max_retries=5) # still works, client-wide
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
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.
|
|
336
|
+
|
|
267
337
|
### Streaming
|
|
268
338
|
|
|
269
339
|
`stream=True` returns a `ChatStream` (`AsyncChatStream` for `AsyncClient`) with typed helpers:
|
|
@@ -364,6 +434,7 @@ dashscope.settings.log_level = "INFO"
|
|
|
364
434
|
| `DASHSCOPE_WEBSOCKET_BASE_URL` | Override the WebSocket endpoint | derived from region/workspace |
|
|
365
435
|
| `DASHSCOPE_TIMEOUT` | Request timeout (seconds) | `300` |
|
|
366
436
|
| `DASHSCOPE_MAX_RETRIES` | Automatic retries | `2` |
|
|
437
|
+
| `DASHSCOPE_STRICT_VALIDATION` | Raise on a response body that does not fit its typed model instead of degrading it | `false` |
|
|
367
438
|
| `DASHSCOPE_HTTP_MAX_CONNECTIONS` | Connection-pool size | `100` |
|
|
368
439
|
| `DASHSCOPE_HTTP_MAX_KEEPALIVE_CONNECTIONS` | Keep-alive connections held in the pool | `20` |
|
|
369
440
|
| `DASHSCOPE_HTTP_KEEPALIVE_EXPIRY` | Keep-alive expiry (seconds) | `5.0` |
|
|
@@ -373,6 +444,10 @@ dashscope.settings.log_level = "INFO"
|
|
|
373
444
|
|
|
374
445
|
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
446
|
|
|
447
|
+
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.
|
|
448
|
+
|
|
449
|
+
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.
|
|
450
|
+
|
|
376
451
|
**Config file** (`~/.dashscope/config.toml`):
|
|
377
452
|
|
|
378
453
|
```toml
|
|
@@ -511,11 +586,11 @@ For the latest model list, visit the [Model Studio model plaza](https://bailian.
|
|
|
511
586
|
|
|
512
587
|
## AI Assistant: DashScope SDK Expert
|
|
513
588
|
|
|
514
|
-
The SDK
|
|
589
|
+
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
590
|
|
|
516
|
-
- Run `dashscope` with no arguments to start the assistant. On first run it offers to
|
|
591
|
+
- 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
592
|
- 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
|
-
-
|
|
593
|
+
- With Python 3.10+, install the `acli` extra: `pip install "dashscope[acli]"`. Add `acli-voice` / `acli-camera` for voice and camera input, or `acli-all` for everything — see the [extras table](#installation).
|
|
519
594
|
- Full walkthrough: [DashScope SDK Expert guide](https://help.aliyun.com/en/model-studio/dashscope-sdk-expert).
|
|
520
595
|
|
|
521
596
|
## Command line
|
|
@@ -26,7 +26,7 @@ The DashScope Python SDK is the official client for [Alibaba Cloud Model Studio
|
|
|
26
26
|
pip install -U dashscope
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
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
|
|
29
|
+
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+:
|
|
30
30
|
|
|
31
31
|
| Extra | Provides | Install |
|
|
32
32
|
|-------|----------|---------|
|
|
@@ -183,6 +183,82 @@ resp.request_id
|
|
|
183
183
|
|
|
184
184
|
All responses share a common envelope: `request_id`, `status_code`, `code`, `message`, `is_error`, and raw `headers`.
|
|
185
185
|
|
|
186
|
+
### Pagination
|
|
187
|
+
|
|
188
|
+
List endpoints return a page object you can iterate and advance instead of looping `page_no` by hand:
|
|
189
|
+
|
|
190
|
+
```python
|
|
191
|
+
page = client.models.list(page_no=1, page_size=10)
|
|
192
|
+
|
|
193
|
+
for model in page: # this page's items
|
|
194
|
+
...
|
|
195
|
+
page.total_count # catalog total, as reported by the gateway
|
|
196
|
+
page.has_next_page()
|
|
197
|
+
page.next_page() # None on the last page
|
|
198
|
+
|
|
199
|
+
for page in client.models.list(page_size=50).iter_pages(): # every page
|
|
200
|
+
...
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
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.
|
|
204
|
+
|
|
205
|
+
Serialize a page with `model_dump()`. Iterating a page yields its *items*, so `dict(page)` is not a way to read its fields.
|
|
206
|
+
|
|
207
|
+
`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.
|
|
208
|
+
|
|
209
|
+
### Raw responses
|
|
210
|
+
|
|
211
|
+
Pass `raw=True` to get the response object itself, before any error check:
|
|
212
|
+
|
|
213
|
+
```python
|
|
214
|
+
resp = client.models.list(raw=True)
|
|
215
|
+
|
|
216
|
+
resp.status_code
|
|
217
|
+
resp.headers # includes non-standard gateway headers
|
|
218
|
+
resp.request_id
|
|
219
|
+
resp.elapsed
|
|
220
|
+
resp.json() # decoded body
|
|
221
|
+
resp.parse(ModelList) # typed model, memoized per type
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
`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.
|
|
225
|
+
|
|
226
|
+
`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:
|
|
227
|
+
|
|
228
|
+
```python
|
|
229
|
+
from dashscope.resources.models import ModelList, Model
|
|
230
|
+
from dashscope.resources.files import FileList, File
|
|
231
|
+
from dashscope.resources._jobs import Job, JobList
|
|
232
|
+
from dashscope.resources.embeddings import EmbeddingResponse
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
`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.
|
|
236
|
+
|
|
237
|
+
### Per-request options
|
|
238
|
+
|
|
239
|
+
Every resource method that makes an HTTP request takes the same three escape hatches, for anything this SDK does not model yet:
|
|
240
|
+
|
|
241
|
+
```python
|
|
242
|
+
client.chat.completions.create(
|
|
243
|
+
model="qwen-plus",
|
|
244
|
+
messages=["hi"],
|
|
245
|
+
extra_headers={"x-gateway-experiment": "on"},
|
|
246
|
+
extra_query={"debug": "1"},
|
|
247
|
+
extra_body={"parameters": {"top_k": 5}},
|
|
248
|
+
)
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
`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.
|
|
252
|
+
|
|
253
|
+
`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:
|
|
254
|
+
|
|
255
|
+
```python
|
|
256
|
+
client.deployments.list(max_retries=0) # one attempt, no retry
|
|
257
|
+
client.with_options(max_retries=5) # still works, client-wide
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
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.
|
|
261
|
+
|
|
186
262
|
### Streaming
|
|
187
263
|
|
|
188
264
|
`stream=True` returns a `ChatStream` (`AsyncChatStream` for `AsyncClient`) with typed helpers:
|
|
@@ -283,6 +359,7 @@ dashscope.settings.log_level = "INFO"
|
|
|
283
359
|
| `DASHSCOPE_WEBSOCKET_BASE_URL` | Override the WebSocket endpoint | derived from region/workspace |
|
|
284
360
|
| `DASHSCOPE_TIMEOUT` | Request timeout (seconds) | `300` |
|
|
285
361
|
| `DASHSCOPE_MAX_RETRIES` | Automatic retries | `2` |
|
|
362
|
+
| `DASHSCOPE_STRICT_VALIDATION` | Raise on a response body that does not fit its typed model instead of degrading it | `false` |
|
|
286
363
|
| `DASHSCOPE_HTTP_MAX_CONNECTIONS` | Connection-pool size | `100` |
|
|
287
364
|
| `DASHSCOPE_HTTP_MAX_KEEPALIVE_CONNECTIONS` | Keep-alive connections held in the pool | `20` |
|
|
288
365
|
| `DASHSCOPE_HTTP_KEEPALIVE_EXPIRY` | Keep-alive expiry (seconds) | `5.0` |
|
|
@@ -292,6 +369,10 @@ dashscope.settings.log_level = "INFO"
|
|
|
292
369
|
|
|
293
370
|
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.
|
|
294
371
|
|
|
372
|
+
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.
|
|
373
|
+
|
|
374
|
+
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.
|
|
375
|
+
|
|
295
376
|
**Config file** (`~/.dashscope/config.toml`):
|
|
296
377
|
|
|
297
378
|
```toml
|
|
@@ -430,11 +511,11 @@ For the latest model list, visit the [Model Studio model plaza](https://bailian.
|
|
|
430
511
|
|
|
431
512
|
## AI Assistant: DashScope SDK Expert
|
|
432
513
|
|
|
433
|
-
The SDK
|
|
514
|
+
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.
|
|
434
515
|
|
|
435
|
-
- Run `dashscope` with no arguments to start the assistant. On first run it offers to
|
|
516
|
+
- 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`.
|
|
436
517
|
- 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.
|
|
437
|
-
-
|
|
518
|
+
- With Python 3.10+, install the `acli` extra: `pip install "dashscope[acli]"`. Add `acli-voice` / `acli-camera` for voice and camera input, or `acli-all` for everything — see the [extras table](#installation).
|
|
438
519
|
- Full walkthrough: [DashScope SDK Expert guide](https://help.aliyun.com/en/model-studio/dashscope-sdk-expert).
|
|
439
520
|
|
|
440
521
|
## Command line
|
|
@@ -132,6 +132,36 @@ def set_region(region: str, workspace_id: str = None):
|
|
|
132
132
|
base_websocket_api_url = f"wss://{host}/api-ws/v1/inference"
|
|
133
133
|
|
|
134
134
|
|
|
135
|
+
def enable_dev_mock(
|
|
136
|
+
mode: str = "static",
|
|
137
|
+
fixture_path: "str | None" = None,
|
|
138
|
+
) -> None:
|
|
139
|
+
"""Turn on the dev mock process-wide (``static``/``replay``/``record``).
|
|
140
|
+
|
|
141
|
+
Thin forwarder to :mod:`dashscope.devkit`; imported lazily so the
|
|
142
|
+
devkit package is never loaded on the production success path. Once
|
|
143
|
+
enabled, every ``Client``/``AsyncClient`` HTTP call is intercepted at
|
|
144
|
+
the transport. Equivalent to ``DASHSCOPE_DEV_MOCK=<mode>``.
|
|
145
|
+
"""
|
|
146
|
+
from dashscope import devkit
|
|
147
|
+
|
|
148
|
+
devkit.enable_dev_mock(mode, fixture_path)
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
def disable_dev_mock() -> None:
|
|
152
|
+
"""Turn the dev mock back off (forwarder to the devkit package)."""
|
|
153
|
+
from dashscope import devkit
|
|
154
|
+
|
|
155
|
+
devkit.disable_dev_mock()
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
def dev_mock_active() -> bool:
|
|
159
|
+
"""Whether the dev mock is currently active."""
|
|
160
|
+
from dashscope import devkit
|
|
161
|
+
|
|
162
|
+
return devkit.is_active()
|
|
163
|
+
|
|
164
|
+
|
|
135
165
|
# The Assistants API (dashscope.legacy_1x.assistants /
|
|
136
166
|
# dashscope.legacy_1x.threads) is deprecated.
|
|
137
167
|
# Resolve its names lazily (PEP 562) so a plain `import dashscope` does not emit
|
|
@@ -275,6 +305,9 @@ __all__ = [
|
|
|
275
305
|
"WsConnection",
|
|
276
306
|
"WsTask",
|
|
277
307
|
"chat",
|
|
308
|
+
"dev_mock_active",
|
|
309
|
+
"disable_dev_mock",
|
|
310
|
+
"enable_dev_mock",
|
|
278
311
|
"errors",
|
|
279
312
|
"set_region",
|
|
280
313
|
]
|
|
@@ -88,6 +88,11 @@ DEFAULT_HTTP_MAX_CONNECTIONS = 100
|
|
|
88
88
|
DEFAULT_HTTP_MAX_KEEPALIVE_CONNECTIONS = 20
|
|
89
89
|
DEFAULT_HTTP_KEEPALIVE_EXPIRY = 5.0
|
|
90
90
|
|
|
91
|
+
# Response bodies that do not fit the typed models degrade by default,
|
|
92
|
+
# so a gateway adding or retyping a field cannot take a caller's process
|
|
93
|
+
# down; strict mode opts back into raising for contract testing.
|
|
94
|
+
DEFAULT_STRICT_VALIDATION = False
|
|
95
|
+
|
|
91
96
|
# Each wire protocol lives at its own URL path under the gateway host.
|
|
92
97
|
PROTOCOL_DEFAULT_PATHS = {
|
|
93
98
|
"native": "/api/v1",
|
|
@@ -133,6 +138,7 @@ _HTTP_MAX_KEEPALIVE_CONNECTIONS_ENV = (
|
|
|
133
138
|
"DASHSCOPE_HTTP_MAX_KEEPALIVE_CONNECTIONS"
|
|
134
139
|
)
|
|
135
140
|
_HTTP_KEEPALIVE_EXPIRY_ENV = "DASHSCOPE_HTTP_KEEPALIVE_EXPIRY"
|
|
141
|
+
_STRICT_VALIDATION_ENV = "DASHSCOPE_STRICT_VALIDATION"
|
|
136
142
|
_LOG_ENV = "DASHSCOPE_LOG"
|
|
137
143
|
_CONFIG_PATH_ENV = "DASHSCOPE_CONFIG"
|
|
138
144
|
_DEFAULT_CONFIG_PATH = "~/.dashscope/config.toml"
|
|
@@ -153,6 +159,7 @@ _FILE_KEYS = frozenset(
|
|
|
153
159
|
"http_max_connections",
|
|
154
160
|
"http_max_keepalive_connections",
|
|
155
161
|
"http_keepalive_expiry",
|
|
162
|
+
"strict_validation",
|
|
156
163
|
},
|
|
157
164
|
)
|
|
158
165
|
|
|
@@ -181,6 +188,38 @@ def _env_int(name: str) -> Optional[int]:
|
|
|
181
188
|
) from None
|
|
182
189
|
|
|
183
190
|
|
|
191
|
+
# Recognised spellings for a boolean setting. Anything else is rejected
|
|
192
|
+
# rather than coerced: ``"0"`` silently reading as true (the bare
|
|
193
|
+
# truthiness trap) would flip a caller into the wrong mode.
|
|
194
|
+
_TRUTHY = frozenset({"1", "true", "yes", "on", "t", "y"})
|
|
195
|
+
_FALSY = frozenset({"0", "false", "no", "off", "f", "n"})
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
def _coerce_bool(name: str, raw: Any) -> bool:
|
|
199
|
+
"""Interpret one boolean-ish value, shared by env and ``settings``."""
|
|
200
|
+
if isinstance(raw, bool):
|
|
201
|
+
return raw
|
|
202
|
+
if isinstance(raw, int) and raw in (0, 1):
|
|
203
|
+
return bool(raw)
|
|
204
|
+
if isinstance(raw, str):
|
|
205
|
+
normalized = raw.strip().lower()
|
|
206
|
+
if normalized in _TRUTHY:
|
|
207
|
+
return True
|
|
208
|
+
if normalized in _FALSY:
|
|
209
|
+
return False
|
|
210
|
+
raise ValueError(
|
|
211
|
+
f"invalid {name}={raw!r}: expected a boolean "
|
|
212
|
+
"(true/false, 1/0, yes/no, on/off)",
|
|
213
|
+
)
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
def _env_bool(name: str) -> Optional[bool]:
|
|
217
|
+
raw = os.environ.get(name)
|
|
218
|
+
if raw is None or not raw.strip():
|
|
219
|
+
return None
|
|
220
|
+
return _coerce_bool(name, raw)
|
|
221
|
+
|
|
222
|
+
|
|
184
223
|
def _legacy_fallback(host: str) -> str:
|
|
185
224
|
"""Return the legacy gateway host, nudging toward a workspace.
|
|
186
225
|
|
|
@@ -304,6 +343,10 @@ class Config:
|
|
|
304
343
|
DEFAULT_HTTP_MAX_KEEPALIVE_CONNECTIONS
|
|
305
344
|
)
|
|
306
345
|
http_keepalive_expiry: float = DEFAULT_HTTP_KEEPALIVE_EXPIRY
|
|
346
|
+
# Raise instead of degrading when a response body does not fit its
|
|
347
|
+
# typed model. Off by default so a gateway retyping a field cannot
|
|
348
|
+
# break callers; turn it on in CI to catch contract drift.
|
|
349
|
+
strict_validation: bool = DEFAULT_STRICT_VALIDATION
|
|
307
350
|
|
|
308
351
|
|
|
309
352
|
class Settings:
|
|
@@ -504,6 +547,23 @@ class Settings:
|
|
|
504
547
|
with self._lock:
|
|
505
548
|
self._explicit["http_keepalive_expiry"] = value
|
|
506
549
|
|
|
550
|
+
@property
|
|
551
|
+
def strict_validation(self) -> bool:
|
|
552
|
+
# ``is None``, not truthiness: an explicit ``False`` must win over
|
|
553
|
+
# the environment instead of falling through to it.
|
|
554
|
+
value = self._explicit.get("strict_validation")
|
|
555
|
+
if value is None:
|
|
556
|
+
value = _env_bool(_STRICT_VALIDATION_ENV)
|
|
557
|
+
if value is None:
|
|
558
|
+
return DEFAULT_STRICT_VALIDATION
|
|
559
|
+
return value
|
|
560
|
+
|
|
561
|
+
@strict_validation.setter
|
|
562
|
+
def strict_validation(self, value: Union[bool, int, str]) -> None:
|
|
563
|
+
coerced = _coerce_bool("strict_validation", value)
|
|
564
|
+
with self._lock:
|
|
565
|
+
self._explicit["strict_validation"] = coerced
|
|
566
|
+
|
|
507
567
|
@property
|
|
508
568
|
def log_level(self) -> Optional[str]:
|
|
509
569
|
return self._explicit.get("log_level") or os.environ.get(_LOG_ENV)
|
|
@@ -607,6 +667,7 @@ def resolve_config(
|
|
|
607
667
|
protocol: Optional[str] = None,
|
|
608
668
|
timeout: Optional[float] = None,
|
|
609
669
|
max_retries: Optional[int] = None,
|
|
670
|
+
strict_validation: Optional[bool] = None,
|
|
610
671
|
config_path: Union[str, Path, None] = None,
|
|
611
672
|
) -> Config:
|
|
612
673
|
path = (
|
|
@@ -702,6 +763,19 @@ def resolve_config(
|
|
|
702
763
|
f"got {resolved_http_keepalive_expiry}",
|
|
703
764
|
)
|
|
704
765
|
|
|
766
|
+
# _coerce_bool rather than bool(): a config.toml written as
|
|
767
|
+
# strict_validation = "false" would otherwise read as True.
|
|
768
|
+
resolved_strict_validation = _coerce_bool(
|
|
769
|
+
"strict_validation",
|
|
770
|
+
_pick(
|
|
771
|
+
strict_validation,
|
|
772
|
+
settings.get_explicit("strict_validation"),
|
|
773
|
+
_env_bool(_STRICT_VALIDATION_ENV),
|
|
774
|
+
file_cfg.get("strict_validation"),
|
|
775
|
+
DEFAULT_STRICT_VALIDATION,
|
|
776
|
+
),
|
|
777
|
+
)
|
|
778
|
+
|
|
705
779
|
resolved_workspace = _pick(
|
|
706
780
|
workspace,
|
|
707
781
|
settings.get_explicit("workspace"),
|
|
@@ -770,4 +844,5 @@ def resolve_config(
|
|
|
770
844
|
http_max_connections=resolved_http_max_connections,
|
|
771
845
|
http_max_keepalive_connections=resolved_http_max_keepalive,
|
|
772
846
|
http_keepalive_expiry=resolved_http_keepalive_expiry,
|
|
847
|
+
strict_validation=resolved_strict_validation,
|
|
773
848
|
)
|
|
@@ -41,6 +41,29 @@ _API_KEY_RE = re.compile(r"\bsk-[A-Za-z0-9_-]{16,}\b")
|
|
|
41
41
|
REDACTED = "[REDACTED]"
|
|
42
42
|
|
|
43
43
|
|
|
44
|
+
def request_id_from_headers(
|
|
45
|
+
headers: Optional[Mapping[str, Any]],
|
|
46
|
+
) -> Optional[str]:
|
|
47
|
+
"""Find a gateway request ID without assuming header casing."""
|
|
48
|
+
names = {"x-request-id", "x-dashscope-requestid", "x-dashscope-request-id"}
|
|
49
|
+
for name, value in (headers or {}).items():
|
|
50
|
+
if not isinstance(name, str) or name.lower() not in names:
|
|
51
|
+
continue
|
|
52
|
+
values = value if isinstance(value, (list, tuple)) else (value,)
|
|
53
|
+
for item in values:
|
|
54
|
+
if isinstance(item, str) and item.strip():
|
|
55
|
+
return item
|
|
56
|
+
return None
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def request_id_for_log(*request_ids: Any) -> str:
|
|
60
|
+
"""Use real ID strings only; never stringify arbitrary response objects."""
|
|
61
|
+
for request_id in request_ids:
|
|
62
|
+
if isinstance(request_id, str) and request_id.strip():
|
|
63
|
+
return request_id
|
|
64
|
+
return "unknown"
|
|
65
|
+
|
|
66
|
+
|
|
44
67
|
def redact_headers(
|
|
45
68
|
headers: Optional[Mapping[str, Any]],
|
|
46
69
|
) -> Optional[dict]:
|
{dashscope-2.0.4 → dashscope-2.1.0}/dashscope/applications/agentstudio/resources/sessions.py
RENAMED
|
@@ -26,7 +26,11 @@ from dashscope.applications.agentstudio.resources.session_threads import (
|
|
|
26
26
|
SessionThreads,
|
|
27
27
|
AsyncSessionThreads,
|
|
28
28
|
)
|
|
29
|
-
from dashscope.applications.agentstudio.types import
|
|
29
|
+
from dashscope.applications.agentstudio.types import (
|
|
30
|
+
DeleteResponse,
|
|
31
|
+
ResourceInput,
|
|
32
|
+
Session,
|
|
33
|
+
)
|
|
30
34
|
from dashscope.applications.agentstudio.types.params import (
|
|
31
35
|
SessionCreateParams,
|
|
32
36
|
SessionListParams,
|
|
@@ -52,12 +56,31 @@ class Sessions:
|
|
|
52
56
|
agent: Any,
|
|
53
57
|
environment_id: Optional[str] = None,
|
|
54
58
|
title: Optional[str] = None,
|
|
55
|
-
resources: Optional[Sequence[
|
|
59
|
+
resources: Optional[Sequence[ResourceInput]] = None,
|
|
56
60
|
vault_ids: Optional[Sequence[str]] = None,
|
|
57
61
|
environment_variables: Optional[Mapping[str, str]] = None,
|
|
58
62
|
mcp_configs: Optional[Sequence[Mapping[str, Any]]] = None,
|
|
59
63
|
metadata: Optional[Mapping[str, Any]] = None,
|
|
60
64
|
) -> Session:
|
|
65
|
+
"""Create a session (``POST /sessions``).
|
|
66
|
+
|
|
67
|
+
``agent`` is the Agent id string or an
|
|
68
|
+
``{"type": "agent_with_overrides", ...}`` mapping. ``resources``
|
|
69
|
+
entries are wire-format mappings (or
|
|
70
|
+
:class:`~dashscope.agentstudio.types.Mount` objects, which
|
|
71
|
+
serialize to the same mappings)::
|
|
72
|
+
|
|
73
|
+
client.sessions.create(
|
|
74
|
+
agent=agent_id,
|
|
75
|
+
resources=[
|
|
76
|
+
{"type": "memory_store", "memory_store_id": store_id,
|
|
77
|
+
"access": "read_write"},
|
|
78
|
+
{"type": "oss", "region": "cn-beijing", "bucket": "bkt",
|
|
79
|
+
"oss_path": "datasets/", "mount_path": "/data",
|
|
80
|
+
"access": "read_only"},
|
|
81
|
+
],
|
|
82
|
+
)
|
|
83
|
+
"""
|
|
61
84
|
body = SessionCreateParams(
|
|
62
85
|
agent=agent,
|
|
63
86
|
environment_id=environment_id,
|
|
@@ -191,12 +214,31 @@ class AsyncSessions:
|
|
|
191
214
|
agent: Any,
|
|
192
215
|
environment_id: Optional[str] = None,
|
|
193
216
|
title: Optional[str] = None,
|
|
194
|
-
resources: Optional[Sequence[
|
|
217
|
+
resources: Optional[Sequence[ResourceInput]] = None,
|
|
195
218
|
vault_ids: Optional[Sequence[str]] = None,
|
|
196
219
|
environment_variables: Optional[Mapping[str, str]] = None,
|
|
197
220
|
mcp_configs: Optional[Sequence[Mapping[str, Any]]] = None,
|
|
198
221
|
metadata: Optional[Mapping[str, Any]] = None,
|
|
199
222
|
) -> Session:
|
|
223
|
+
"""Create a session (``POST /sessions``).
|
|
224
|
+
|
|
225
|
+
``agent`` is the Agent id string or an
|
|
226
|
+
``{"type": "agent_with_overrides", ...}`` mapping. ``resources``
|
|
227
|
+
entries are wire-format mappings (or
|
|
228
|
+
:class:`~dashscope.agentstudio.types.Mount` objects, which
|
|
229
|
+
serialize to the same mappings)::
|
|
230
|
+
|
|
231
|
+
client.sessions.create(
|
|
232
|
+
agent=agent_id,
|
|
233
|
+
resources=[
|
|
234
|
+
{"type": "memory_store", "memory_store_id": store_id,
|
|
235
|
+
"access": "read_write"},
|
|
236
|
+
{"type": "oss", "region": "cn-beijing", "bucket": "bkt",
|
|
237
|
+
"oss_path": "datasets/", "mount_path": "/data",
|
|
238
|
+
"access": "read_only"},
|
|
239
|
+
],
|
|
240
|
+
)
|
|
241
|
+
"""
|
|
200
242
|
body = SessionCreateParams(
|
|
201
243
|
agent=agent,
|
|
202
244
|
environment_id=environment_id,
|