dashscope 2.0.1__tar.gz → 2.0.2__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.1 → dashscope-2.0.2}/PKG-INFO +1 -1
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/agent.md +1 -1
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/agentstudio/__init__.py +2 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/agentstudio/client.py +13 -4
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/agentstudio/resources/agents.py +10 -8
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/agentstudio/resources/session_events.py +54 -24
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/agentstudio/types/__init__.py +1 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/agentstudio/types/models.py +51 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/agentstudio/types/params.py +28 -9
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/observability/genai/_core.py +8 -1
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/observability/genai/messages.py +23 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/observability/genai/tools.py +1 -1
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/version.py +1 -1
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope.egg-info/PKG-INFO +1 -1
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/03_agent_recipes/agentstudio.py +9 -3
- {dashscope-2.0.1 → dashscope-2.0.2}/LICENSE +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/LICENSE.certifi +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/MANIFEST.in +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/NOTICE +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/README.md +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/__init__.pyi +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/__main__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/acceptance.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/agent.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/agents/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/agents/delegate.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/agents/subagent.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/agents/subagents.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/audit.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/capabilities/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/capabilities/local_memory.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/cli/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/cli/completer.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/cli/constants.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/cli/dispatch.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/cli/examples.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/cli/handlers_capability.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/cli/handlers_config.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/cli/handlers_device.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/cli/handlers_key.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/cli/handlers_misc.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/cli/handlers_profile.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/cli/handlers_provider.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/cli/handlers_session.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/cli/handlers_setup.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/cli/handlers_skill.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/cli/mcp.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/cli/multimodal.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/cli/repl.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/cli/runners.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/cli/startup.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/cli/streaming.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/commands.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/compression.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/config.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/debuglog.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/deliverable.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/dev.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/eval/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/examples/basic-chat/.acli/config.toml +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/examples/basic-chat/.acli/custom-extensions.toml +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/examples/basic-chat/.acli/hooks.toml +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/examples/basic-chat/.acli/skills/explain-code.md +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/examples/basic-chat/.acli/skills/research-topic.md +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/examples/basic-chat/.acli/skills/translate.md +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/examples/basic-chat/.acli/skills/write-poem.md +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/examples/basic-chat/.acli/system-prompt.md +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/examples/basic-chat/README.md +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/examples/dashscope-sdk-expert/.acli/config.toml +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/examples/dashscope-sdk-expert/.acli/custom-extensions.toml +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/examples/dashscope-sdk-expert/.acli/hooks.toml +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/api-doc.md +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/cli.md +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/diagnose.md +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/error-code.md +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/explain-code.md +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/fine-tuning.md +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/multimodal.md +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/retrieval.md +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/sdk-example.md +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/speech.md +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/text-generation.md +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/examples/dashscope-sdk-expert/.acli/skills/translate.md +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/examples/dashscope-sdk-expert/.acli/system-prompt.md +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/examples/dashscope-sdk-expert/README.md +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/executor.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/extensions.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/hooks.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/mcp_server.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/mcp_stdio.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/memory/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/memory/directives_learning.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/memory/experience.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/memory/manager.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/memory/plan.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/memory/reflection.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/memory/skill_evolution.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/memory/tool_chains.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/memory/trace.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/permission.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/platforms/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/platforms/bailian/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/platforms/bailian/cli.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/platforms/bailian/mcp.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/platforms/base.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/platforms/local/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/platforms/local/history.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/platforms/local/memory.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/prompt.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/prompt_pipeline.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/providers/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/providers/adapter.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/providers/anthropic.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/providers/base.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/providers/hardening.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/providers/openai.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/providers/profile.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/providers/tongyi.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/sandbox.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/scheduler.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/sdk.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/session.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/session_events.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/skills/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/skills/base.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/skills/manager.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/skills/package.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/skills/store.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/tools/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/tools/browser.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/tools/camera.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/tools/checkpoint.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/tools/evolution.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/tools/filesystem.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/tools/platform.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/tools/registry.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/tools/session.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/tools/shell.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/tools/skills.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/tools/vision.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/tools/web_search.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/ui/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/ui/camera.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/ui/embedded.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/ui/tts.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/ui/tui.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/ui/voice.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/utils/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/utils/clipboard.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/utils/crypto.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/utils/exceptions.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/utils/ids.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/utils/images.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/utils/keywords.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/utils/messages.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/utils/paths.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/utils/sanitizer.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/utils/spinner.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/utils/template.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/utils/text.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/utils/toml.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/acli/utils/validation.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/agentstudio/constants.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/agentstudio/exceptions.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/agentstudio/pagination.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/agentstudio/resources/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/agentstudio/resources/_helpers.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/agentstudio/resources/deployments.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/agentstudio/resources/environments.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/agentstudio/resources/files.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/agentstudio/resources/memory_stores.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/agentstudio/resources/security.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/agentstudio/resources/session_resources.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/agentstudio/resources/session_threads.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/agentstudio/resources/sessions.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/agentstudio/resources/skills.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/agentstudio/resources/vaults.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/agentstudio/resources/webhook_endpoints.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/agentstudio/streaming.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/agentstudio/transport.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/aigc/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/aigc/chat_completion.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/aigc/code_generation.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/aigc/conversation.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/aigc/generation.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/aigc/image_generation.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/aigc/image_synthesis.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/aigc/multimodal_conversation.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/aigc/video_synthesis.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/api_entities/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/api_entities/aio_session.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/api_entities/aiohttp_request.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/api_entities/api_request_data.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/api_entities/api_request_factory.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/api_entities/base_request.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/api_entities/chat_completion_types.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/api_entities/dashscope_response.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/api_entities/encryption.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/api_entities/http_request.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/api_entities/websocket_request.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/app/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/app/application.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/app/application_response.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/assistants/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/assistants/assistant_types.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/assistants/assistants.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/assistants/files.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/audio/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/audio/asr/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/audio/asr/asr_phrase_manager.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/audio/asr/recognition.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/audio/asr/transcription.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/audio/asr/translation_recognizer.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/audio/asr/vocabulary.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/audio/http_tts/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/audio/http_tts/http_speech_synthesizer.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/audio/qwen_asr/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/audio/qwen_asr/qwen_transcription.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/audio/qwen_omni/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/audio/qwen_omni/omni_realtime.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/audio/qwen_tts/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/audio/qwen_tts/speech_synthesizer.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/audio/qwen_tts_realtime/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/audio/qwen_tts_realtime/qwen_tts_realtime.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/audio/tts/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/audio/tts/speech_synthesizer.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/audio/tts_v2/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/audio/tts_v2/enrollment.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/audio/tts_v2/speech_synthesizer.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/cli/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/cli/__main__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/cli/agentic_rl.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/cli/application.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/cli/auth.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/cli/code_generation.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/cli/common.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/cli/deployments.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/cli/embeddings.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/cli/files.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/cli/fine_tunes.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/cli/generation.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/cli/image_generation.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/cli/image_synthesis.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/cli/models.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/cli/multimodal_conversation.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/cli/multimodal_embedding.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/cli/oss.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/cli/rerank.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/cli/speech_synthesis.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/cli/tokenization.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/cli/transcription.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/cli/understanding.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/cli/video_synthesis.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/client/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/client/base_api.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/common/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/common/_sdk_session.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/common/api_key.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/common/base_type.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/common/constants.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/common/env.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/common/error.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/common/logging.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/common/message_manager.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/common/utils.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/embeddings/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/embeddings/batch_text_embedding.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/embeddings/batch_text_embedding_response.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/embeddings/multimodal_embedding.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/embeddings/text_embedding.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/files.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/agentic_rl.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/customize_types.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/deployments.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/finetunes.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/common/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/common/constants.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/common/errors.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/common/log.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/common/model.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/common/model_types.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/common/utils.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/data/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/data/base_data_model.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/data/group_reward_input.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/data/group_reward_output.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/data/reward_input.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/data/reward_output.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/data/rollout_input.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/data/rollout_output.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/demo/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/demo/group_reward_processor_demo.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/demo/reward_processor_demo.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/demo/rollout_processor_demo.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/func_decorator.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/func_manager.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/observability/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/observability/genai/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/observability/genai/llm_dashscope.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/observability/genai/llm_openai.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/observability/genai/llm_span.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/observability/processor_span.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/observability/tracing.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/parser/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/parser/base_parser.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/parser/group_reward_parser.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/parser/reward_parser.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/parser/rollout_parser.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/processor/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/processor/abstract_group_reward_processor.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/processor/abstract_processor.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/processor/abstract_reward_processor.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/processor/abstract_rollout_processor.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/server/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/finetune/reinforcement/component/server/server.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/io/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/io/input_output.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/model.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/models.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/multimodal/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/multimodal/dialog_state.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/multimodal/multimodal_constants.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/multimodal/multimodal_dialog.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/multimodal/multimodal_request_params.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/multimodal/tingwu/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/multimodal/tingwu/tingwu.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/multimodal/tingwu/tingwu_realtime.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/nlp/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/nlp/understanding.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/protocol/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/protocol/websocket.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/py.typed +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/rerank/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/rerank/text_rerank.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/resources/qwen.tiktoken +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/threads/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/threads/messages/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/threads/messages/files.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/threads/messages/messages.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/threads/runs/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/threads/runs/runs.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/threads/runs/steps.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/threads/thread_types.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/threads/threads.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/tokenizers/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/tokenizers/qwen_tokenizer.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/tokenizers/tokenization.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/tokenizers/tokenizer.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/tokenizers/tokenizer_base.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/utils/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/utils/message_utils.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/utils/oss_utils.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/utils/param_utils.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/_config.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/_error_registry.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/_logging.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/_quickstart.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/client.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/errors.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/protocols/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/protocols/anthropic.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/protocols/base.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/protocols/native.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/protocols/openai.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/_agentstudio.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/_jobs.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/_oss.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/_sse.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/apps.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/audio/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/audio/_callbacks.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/audio/asr.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/audio/customization.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/audio/http_tts.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/audio/phrases.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/audio/realtime.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/audio/tts.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/chat/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/chat/completions.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/decision.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/deployments.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/embeddings.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/files.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/fine_tunes.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/images.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/models.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/multimodal/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/multimodal/chat.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/multimodal/embeddings.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/reinforcement_learning.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/rerank.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/tingwu.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/tokenization.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/resources/videos.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/transport/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/transport/_ident.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/transport/_retry.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/transport/http.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/transport/sse.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/transport/ws.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/transport/ws_connection.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/types/__init__.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/types/common.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/types/completions.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope/v2/types/messages.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope.egg-info/SOURCES.txt +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope.egg-info/dependency_links.txt +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope.egg-info/entry_points.txt +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope.egg-info/not-zip-safe +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope.egg-info/requires.txt +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/dashscope.egg-info/top_level.txt +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/applications/apps.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/audio/README.md +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/audio/_common.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/audio/asr_file.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/audio/asr_http_stream.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/audio/asr_microphone.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/audio/asr_websocket.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/audio/connection_reuse.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/audio/direct_call/_common.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/audio/direct_call/asr_file.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/audio/direct_call/asr_http_stream.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/audio/direct_call/asr_microphone.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/audio/direct_call/asr_websocket.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/audio/direct_call/connection_reuse.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/audio/direct_call/realtime_omni.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/audio/direct_call/realtime_qwen_audio.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/audio/direct_call/realtime_translation.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/audio/direct_call/tts_http.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/audio/direct_call/tts_http_stream.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/audio/direct_call/tts_websocket.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/audio/direct_call/voice_clone.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/audio/realtime_omni.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/audio/realtime_qwen_audio.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/audio/realtime_translation.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/audio/tingwu.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/audio/tts_http.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/audio/tts_http_stream.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/audio/tts_websocket.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/audio/voice_clone.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/decision/decision.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/embeddings/embeddings.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/files/files.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/fine_tuning/fine_tunes.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/fine_tuning/reinforcement_learning.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/image_video_synthesis/images.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/image_video_synthesis/videos.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/models/models.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/multimodal_vision/multimodal_chat.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/rerank/rerank.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/text_generation/chat.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/01_atomic_capabilities/text_generation/tokenization.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/02_advanced_engineering/circuit_breaker_retry.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/02_advanced_engineering/client_side_cache.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/02_advanced_engineering/local_mock_debugging.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/03_agent_recipes/agentstudio_deployments.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/03_agent_recipes/mcp_server_demo/README.md +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/03_agent_recipes/mcp_server_demo/client_demo.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/03_agent_recipes/mcp_server_demo/server.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/03_agent_recipes/rag_expert_system.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/03_agent_recipes/tool_call_loop.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/04_real_world_scenarios/README.md +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/04_real_world_scenarios/README_zh.md +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/04_real_world_scenarios/customer_service_assistant.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/04_real_world_scenarios/production_ready_rag_harness.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/04_real_world_scenarios/realtime_audio_meeting_harness.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/04_real_world_scenarios/ticket_triage_harness.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/README.md +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/README_zh.md +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/aio_generation/basic.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/aio_generation/custom_session.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/aio_generation/deep_research.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/aio_generation/reasoning.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/aio_generation/tool_calls.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/aio_image_synthesis.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/aio_multimodal_conversation/asr.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/aio_multimodal_conversation/image.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/aio_multimodal_conversation/ocr.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/aio_multimodal_conversation/tool_calls.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/aio_video_synthesis.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/application.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/assistant_api.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/assistant_api_file.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/assistant_api_simple.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/cv_models.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/generation/basic.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/generation/custom_session.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/generation/deep_research.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/generation/reasoning.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/generation/tool_calls.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/image_generation.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/image_synthesis.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/multimodal_conversation/asr.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/multimodal_conversation/image.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/multimodal_conversation/ocr.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/multimodal_conversation/reasoning.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/multimodal_conversation/tool_calls.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/multimodal_conversation/video.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/multimodal_embedding.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/qwen_asr.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/qwen_tts.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/set_region_example.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/text_rerank.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/tingwu_realtime.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/tingwu_usages.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/examples/legacy_1x/video_synthesis.py +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/requirements.txt +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/setup.cfg +0 -0
- {dashscope-2.0.1 → dashscope-2.0.2}/setup.py +0 -0
|
@@ -13,7 +13,7 @@ description: Quick reference for Agent APIs (agentstudio-hosted Agent/Applicatio
|
|
|
13
13
|
### agentstudio (`from dashscope.agentstudio import Client, AsyncClient`)
|
|
14
14
|
- `Client(api_key=, workspace=, region=None, base_url=None, uid=None, timeout=None, max_retries=2)`; if base_url is not given, `workspace` (or env var `DASHSCOPE_WORKSPACE`) is required; base_url can also be set via `DASHSCOPE_AGENTSTUDIO_URL`/`AGENTSTUDIO_URL`; default region `cn-beijing`, timeout 600s.
|
|
15
15
|
- Resource entry points: `client.agents / .sessions / .environments / .files / .skills / .vaults / .deployments / .deployment_runs`.
|
|
16
|
-
- `agents.create(*, name, model, description=None, system_prompt=None, tools=None, mcp_servers=None, skills=None, metadata=None)` → `Agent`; `retrieve(agent_id, *, version=None)` (alias `get`); `update(agent_id, *, version, ...)`
|
|
16
|
+
- `agents.create(*, name, model, description=None, system_prompt=None, tools=None, mcp_servers=None, skills=None, multiagent=None, metadata=None)` → `Agent`; `model` is a `ModelConfig(id=…, temperature=…, max_tokens=…, enable_thinking=…, thinking_budget=…)` (bare id string = `ModelConfig(id=…)`); `retrieve(agent_id, *, version=None)` (alias `get`); `update(agent_id, *, version, name, model=None, ...)` — version must equal the current version (HTTP 409), `name` is required (`AGENT_005`), and a sent `model` replaces the whole config (keep the rest via `agent.model.copy_with(...)`); `archive(agent_id)`; `list(*, limit, page, include_archived)` → `CursorPage`; `list_versions(agent_id)`.
|
|
17
17
|
- `sessions.create(*, agent, environment_id=None, title=None, resources=None, metadata=None)` → `Session`; also `retrieve/update(title, metadata)/list(*, limit, page, agent_id, statuses, created_at_gt/gte/lt/lte)/archive/delete`.
|
|
18
18
|
- `environments.create(*, name, config, description=None, scope="organization", metadata=None)`; `files.upload(file, *, mime_type=None, progress=None)` (file accepts a path/binary stream/(name, fileobj)); `skills.create(*, file_id=None, file=None, mime_type=None)`, `skills.versions.create(skill_id, ...)`.
|
|
19
19
|
|
|
@@ -55,6 +55,7 @@ from .types import (
|
|
|
55
55
|
MemoryStore,
|
|
56
56
|
MemoryVersion,
|
|
57
57
|
Message,
|
|
58
|
+
ModelConfig,
|
|
58
59
|
PermissionPolicy,
|
|
59
60
|
SecurityAlert,
|
|
60
61
|
SecurityAlertList,
|
|
@@ -124,6 +125,7 @@ __all__ = [
|
|
|
124
125
|
"MemoryStore",
|
|
125
126
|
"MemoryVersion",
|
|
126
127
|
"Message",
|
|
128
|
+
"ModelConfig",
|
|
127
129
|
"PermissionPolicy",
|
|
128
130
|
"SecurityAlert",
|
|
129
131
|
"SecurityAlertList",
|
|
@@ -100,10 +100,18 @@ class Client:
|
|
|
100
100
|
|
|
101
101
|
Usage::
|
|
102
102
|
|
|
103
|
-
from dashscope.agentstudio import Client
|
|
103
|
+
from dashscope.agentstudio import Client, ModelConfig
|
|
104
104
|
|
|
105
105
|
client = Client(api_key="sk-xxx", workspace="my-ws")
|
|
106
|
-
agent = client.agents.create(
|
|
106
|
+
agent = client.agents.create(
|
|
107
|
+
name="demo",
|
|
108
|
+
model=ModelConfig(
|
|
109
|
+
id="qwen-max",
|
|
110
|
+
temperature=0.7,
|
|
111
|
+
enable_thinking=True,
|
|
112
|
+
thinking_budget=2048,
|
|
113
|
+
),
|
|
114
|
+
)
|
|
107
115
|
session = client.sessions.create(agent=agent.id)
|
|
108
116
|
with client.sessions.events.stream(session.id) as stream:
|
|
109
117
|
for event in stream:
|
|
@@ -173,11 +181,12 @@ class AsyncClient:
|
|
|
173
181
|
|
|
174
182
|
Usage::
|
|
175
183
|
|
|
176
|
-
from dashscope.agentstudio import AsyncClient
|
|
184
|
+
from dashscope.agentstudio import AsyncClient, ModelConfig
|
|
177
185
|
|
|
178
186
|
client = AsyncClient(api_key="sk-xxx", workspace="my-ws")
|
|
179
187
|
agent = await client.agents.create(
|
|
180
|
-
name="demo",
|
|
188
|
+
name="demo",
|
|
189
|
+
model=ModelConfig(id="qwen-max", max_tokens=4096),
|
|
181
190
|
)
|
|
182
191
|
session = await client.sessions.create(agent=agent.id)
|
|
183
192
|
async with client.sessions.events.stream(session.id) as stream:
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
7
|
-
from typing import Any, Mapping, Optional, Sequence
|
|
7
|
+
from typing import Any, Mapping, Optional, Sequence, Union
|
|
8
8
|
|
|
9
9
|
from dashscope.agentstudio.pagination import (
|
|
10
10
|
AsyncCursorPage,
|
|
@@ -15,7 +15,7 @@ from dashscope.agentstudio.resources._helpers import (
|
|
|
15
15
|
_coerce_agent,
|
|
16
16
|
_coerce_agent_version,
|
|
17
17
|
)
|
|
18
|
-
from dashscope.agentstudio.types import Agent, AgentVersion
|
|
18
|
+
from dashscope.agentstudio.types import Agent, AgentVersion, ModelConfig
|
|
19
19
|
from dashscope.agentstudio.types.params import (
|
|
20
20
|
AgentCreateParams,
|
|
21
21
|
AgentListParams,
|
|
@@ -36,7 +36,7 @@ class Agents:
|
|
|
36
36
|
self,
|
|
37
37
|
*,
|
|
38
38
|
name: str,
|
|
39
|
-
model: str,
|
|
39
|
+
model: Union[str, ModelConfig],
|
|
40
40
|
description: Optional[str] = None,
|
|
41
41
|
system_prompt: Optional[str] = None,
|
|
42
42
|
tools: Optional[Sequence[Mapping[str, Any]]] = None,
|
|
@@ -85,8 +85,8 @@ class Agents:
|
|
|
85
85
|
*,
|
|
86
86
|
version: int,
|
|
87
87
|
name: Optional[str] = None,
|
|
88
|
+
model: Optional[Union[str, ModelConfig]] = None,
|
|
88
89
|
description: Optional[str] = None,
|
|
89
|
-
model: Optional[str] = None,
|
|
90
90
|
system_prompt: Optional[str] = None,
|
|
91
91
|
tools: Optional[Sequence[Mapping[str, Any]]] = None,
|
|
92
92
|
mcp_servers: Optional[Sequence[Mapping[str, Any]]] = None,
|
|
@@ -99,12 +99,13 @@ class Agents:
|
|
|
99
99
|
``version`` must equal the server's current version;
|
|
100
100
|
the server rejects mismatches with HTTP 409.
|
|
101
101
|
Retrieve the agent first to obtain the current version.
|
|
102
|
+
``name`` is required too (``AGENT_005`` without it).
|
|
102
103
|
"""
|
|
103
104
|
body = AgentUpdateParams(
|
|
104
105
|
version=version,
|
|
105
106
|
name=name,
|
|
106
|
-
description=description,
|
|
107
107
|
model=model,
|
|
108
|
+
description=description,
|
|
108
109
|
system_prompt=system_prompt,
|
|
109
110
|
tools=tools,
|
|
110
111
|
mcp_servers=mcp_servers,
|
|
@@ -189,7 +190,7 @@ class AsyncAgents:
|
|
|
189
190
|
self,
|
|
190
191
|
*,
|
|
191
192
|
name: str,
|
|
192
|
-
model: str,
|
|
193
|
+
model: Union[str, ModelConfig],
|
|
193
194
|
description: Optional[str] = None,
|
|
194
195
|
system_prompt: Optional[str] = None,
|
|
195
196
|
tools: Optional[Sequence[Mapping[str, Any]]] = None,
|
|
@@ -242,8 +243,8 @@ class AsyncAgents:
|
|
|
242
243
|
*,
|
|
243
244
|
version: int,
|
|
244
245
|
name: Optional[str] = None,
|
|
246
|
+
model: Optional[Union[str, ModelConfig]] = None,
|
|
245
247
|
description: Optional[str] = None,
|
|
246
|
-
model: Optional[str] = None,
|
|
247
248
|
system_prompt: Optional[str] = None,
|
|
248
249
|
tools: Optional[Sequence[Mapping[str, Any]]] = None,
|
|
249
250
|
mcp_servers: Optional[Sequence[Mapping[str, Any]]] = None,
|
|
@@ -256,12 +257,13 @@ class AsyncAgents:
|
|
|
256
257
|
``version`` must equal the server's current version;
|
|
257
258
|
the server rejects mismatches with HTTP 409.
|
|
258
259
|
Retrieve the agent first to obtain the current version.
|
|
260
|
+
``name`` is required too (``AGENT_005`` without it).
|
|
259
261
|
"""
|
|
260
262
|
body = AgentUpdateParams(
|
|
261
263
|
version=version,
|
|
262
264
|
name=name,
|
|
263
|
-
description=description,
|
|
264
265
|
model=model,
|
|
266
|
+
description=description,
|
|
265
267
|
system_prompt=system_prompt,
|
|
266
268
|
tools=tools,
|
|
267
269
|
mcp_servers=mcp_servers,
|
|
@@ -45,6 +45,15 @@ _TERMINAL_STATUSES = (
|
|
|
45
45
|
)
|
|
46
46
|
|
|
47
47
|
|
|
48
|
+
def _terminal_status(event: Any) -> bool:
|
|
49
|
+
"""True when a ``session_status`` event reports that the run is over."""
|
|
50
|
+
if getattr(event, "type", None) != SSEEventType.SESSION_STATUS:
|
|
51
|
+
return False
|
|
52
|
+
block = event.content[0] if event.content else None
|
|
53
|
+
data = getattr(block, "data", None) or {}
|
|
54
|
+
return data.get("session_status") in _TERMINAL_STATUSES
|
|
55
|
+
|
|
56
|
+
|
|
48
57
|
class SessionEvents:
|
|
49
58
|
"""Session event send / list / stream."""
|
|
50
59
|
|
|
@@ -125,9 +134,13 @@ class SessionEvents:
|
|
|
125
134
|
) -> "_TypedEventStream":
|
|
126
135
|
"""Open the SSE stream and return an iterator of typed events.
|
|
127
136
|
|
|
128
|
-
``event_deltas`` opts into incremental
|
|
129
|
-
|
|
130
|
-
|
|
137
|
+
``event_deltas`` opts into incremental streaming for the given event
|
|
138
|
+
types (``"message"`` and/or ``"reasoning"``; aliases ``"agent.message"``
|
|
139
|
+
/ ``"agent.thinking"``); anything else the server rejects. The stream is
|
|
140
|
+
read once, so ``text_deltas`` can be taken from it only; a second pass
|
|
141
|
+
raises rather than returning nothing. A chunk stream is not a reliable
|
|
142
|
+
source for final text: a reconnect replays only persisted events, so use
|
|
143
|
+
``text_stream``.
|
|
131
144
|
"""
|
|
132
145
|
params: Optional[Dict[str, Any]] = None
|
|
133
146
|
if event_deltas:
|
|
@@ -146,7 +159,13 @@ class SessionEvents:
|
|
|
146
159
|
|
|
147
160
|
|
|
148
161
|
class _TypedEventStream:
|
|
149
|
-
"""Wrap :class:`EventStream` so iterating yields :class:`ServerEvent`.
|
|
162
|
+
"""Wrap :class:`EventStream` so iterating yields :class:`ServerEvent`.
|
|
163
|
+
|
|
164
|
+
A stream is read once: a second pass would silently yield nothing, so it
|
|
165
|
+
raises instead. Call ``sessions.events.stream()`` again to read the events.
|
|
166
|
+
"""
|
|
167
|
+
|
|
168
|
+
_passed = False
|
|
150
169
|
|
|
151
170
|
def __init__(self, stream: EventStream) -> None:
|
|
152
171
|
self._stream = stream
|
|
@@ -179,6 +198,15 @@ class _TypedEventStream:
|
|
|
179
198
|
self.close()
|
|
180
199
|
|
|
181
200
|
def __iter__(self) -> Iterator[ServerEvent]:
|
|
201
|
+
if self._passed:
|
|
202
|
+
raise RuntimeError(
|
|
203
|
+
"this stream is single-pass and was already consumed; call "
|
|
204
|
+
"sessions.events.stream() again to read it again",
|
|
205
|
+
)
|
|
206
|
+
self._passed = True
|
|
207
|
+
return self._iter()
|
|
208
|
+
|
|
209
|
+
def _iter(self) -> Iterator[ServerEvent]:
|
|
182
210
|
for payload in self._stream:
|
|
183
211
|
yield _coerce_event(payload)
|
|
184
212
|
|
|
@@ -196,30 +224,27 @@ class _TypedEventStream:
|
|
|
196
224
|
text = getattr(block, "text", "")
|
|
197
225
|
if text:
|
|
198
226
|
yield text
|
|
199
|
-
elif
|
|
200
|
-
|
|
201
|
-
d = getattr(block, "data", None) or {}
|
|
202
|
-
if d.get("session_status") in _TERMINAL_STATUSES:
|
|
203
|
-
return
|
|
227
|
+
elif _terminal_status(event):
|
|
228
|
+
return
|
|
204
229
|
|
|
205
230
|
@property
|
|
206
231
|
def text_deltas(self):
|
|
207
232
|
"""Iterate over incremental text chunks from ``event_delta`` frames.
|
|
208
233
|
|
|
209
234
|
Requires the stream to be opened with ``event_deltas``; otherwise
|
|
210
|
-
yields nothing (use :attr:`text_stream` for terminal full text
|
|
235
|
+
yields nothing (use :attr:`text_stream` for terminal full text, which is
|
|
236
|
+
also what a reconnect can rebuild — chunks are not replayed).
|
|
211
237
|
"""
|
|
238
|
+
return self._text_deltas()
|
|
239
|
+
|
|
240
|
+
def _text_deltas(self):
|
|
212
241
|
for event in self:
|
|
213
|
-
|
|
214
|
-
if etype == "event_delta":
|
|
242
|
+
if getattr(event, "type", None) == "event_delta":
|
|
215
243
|
text = event.delta_text
|
|
216
244
|
if text:
|
|
217
245
|
yield text
|
|
218
|
-
elif
|
|
219
|
-
|
|
220
|
-
d = getattr(block, "data", None) or {}
|
|
221
|
-
if d.get("session_status") in _TERMINAL_STATUSES:
|
|
222
|
-
return
|
|
246
|
+
elif _terminal_status(event):
|
|
247
|
+
return
|
|
223
248
|
|
|
224
249
|
def close(self) -> None:
|
|
225
250
|
self._stream.close()
|
|
@@ -331,7 +356,15 @@ class _AioTypedEventStream:
|
|
|
331
356
|
async def __aexit__(self, *exc: Any) -> None:
|
|
332
357
|
await self.aclose()
|
|
333
358
|
|
|
359
|
+
_passed = False
|
|
360
|
+
|
|
334
361
|
def __aiter__(self) -> AsyncIterator[ServerEvent]:
|
|
362
|
+
if self._passed:
|
|
363
|
+
raise RuntimeError(
|
|
364
|
+
"this stream is single-pass and was already consumed; call "
|
|
365
|
+
"sessions.events.stream() again to read it again",
|
|
366
|
+
)
|
|
367
|
+
self._passed = True
|
|
335
368
|
return self._aiter()
|
|
336
369
|
|
|
337
370
|
async def _aiter(self) -> AsyncIterator[ServerEvent]:
|
|
@@ -358,20 +391,17 @@ class _AioTypedEventStream:
|
|
|
358
391
|
|
|
359
392
|
@property
|
|
360
393
|
def text_deltas(self):
|
|
394
|
+
"""Async incremental text chunks from ``event_delta`` frames."""
|
|
361
395
|
return self._text_deltas()
|
|
362
396
|
|
|
363
397
|
async def _text_deltas(self):
|
|
364
398
|
async for event in self:
|
|
365
|
-
|
|
366
|
-
if etype == "event_delta":
|
|
399
|
+
if getattr(event, "type", None) == "event_delta":
|
|
367
400
|
text = event.delta_text
|
|
368
401
|
if text:
|
|
369
402
|
yield text
|
|
370
|
-
elif
|
|
371
|
-
|
|
372
|
-
d = getattr(block, "data", None) or {}
|
|
373
|
-
if d.get("session_status") in _TERMINAL_STATUSES:
|
|
374
|
-
return
|
|
403
|
+
elif _terminal_status(event):
|
|
404
|
+
return
|
|
375
405
|
|
|
376
406
|
async def aclose(self) -> None:
|
|
377
407
|
await self._stream.aclose()
|
|
@@ -446,6 +446,44 @@ class MultiAgentConfig(BaseModel):
|
|
|
446
446
|
super().__init__(**kwargs)
|
|
447
447
|
|
|
448
448
|
|
|
449
|
+
class ModelConfig(BaseModel):
|
|
450
|
+
"""Model configuration of an agent (the ``model`` field).
|
|
451
|
+
|
|
452
|
+
Wire names as-is: ``id`` required, inference params optional (unset ones
|
|
453
|
+
are omitted so the server default applies), ranges validated server-side.
|
|
454
|
+
``name`` is console-only: the public API neither accepts nor returns it.
|
|
455
|
+
Read or write the wire dict with :meth:`to_dict`.
|
|
456
|
+
"""
|
|
457
|
+
|
|
458
|
+
_fields = (
|
|
459
|
+
"id",
|
|
460
|
+
"name",
|
|
461
|
+
"temperature",
|
|
462
|
+
"max_tokens",
|
|
463
|
+
"enable_thinking",
|
|
464
|
+
"thinking_budget",
|
|
465
|
+
)
|
|
466
|
+
|
|
467
|
+
def copy_with(self, **changes: Any) -> "ModelConfig":
|
|
468
|
+
"""Copy with ``changes`` applied (``None`` drops a field).
|
|
469
|
+
|
|
470
|
+
Update replaces the whole config, so this changes one knob without
|
|
471
|
+
clearing the rest. A name outside :attr:`_fields` has to be carried
|
|
472
|
+
by this config already, so a forward-compat field can be retuned and
|
|
473
|
+
a typo still cannot.
|
|
474
|
+
"""
|
|
475
|
+
unknown = set(changes) - set(self._fields) - set(self.to_dict())
|
|
476
|
+
if unknown:
|
|
477
|
+
raise ValueError(
|
|
478
|
+
"unknown model config field(s): " + ", ".join(sorted(unknown)),
|
|
479
|
+
)
|
|
480
|
+
payload = self.to_dict()
|
|
481
|
+
payload.update(changes)
|
|
482
|
+
return ModelConfig(
|
|
483
|
+
**{k: v for k, v in payload.items() if v is not None},
|
|
484
|
+
)
|
|
485
|
+
|
|
486
|
+
|
|
449
487
|
class Agent(BaseModel):
|
|
450
488
|
_fields = (
|
|
451
489
|
"id",
|
|
@@ -468,6 +506,9 @@ class Agent(BaseModel):
|
|
|
468
506
|
)
|
|
469
507
|
|
|
470
508
|
def __init__(self, **kwargs: Any) -> None:
|
|
509
|
+
model = kwargs.get("model")
|
|
510
|
+
if isinstance(model, Mapping):
|
|
511
|
+
kwargs["model"] = ModelConfig(**dict(model))
|
|
471
512
|
multiagent = kwargs.get("multiagent")
|
|
472
513
|
if isinstance(multiagent, Mapping):
|
|
473
514
|
kwargs["multiagent"] = MultiAgentConfig(**dict(multiagent))
|
|
@@ -478,6 +519,16 @@ class Agent(BaseModel):
|
|
|
478
519
|
"""Alias: server field is ``system``, kept for SDK user convenience."""
|
|
479
520
|
return self.system
|
|
480
521
|
|
|
522
|
+
@property
|
|
523
|
+
def model_id(self) -> Optional[str]:
|
|
524
|
+
"""Convenience: the model id carried by ``model`` (None if unset)."""
|
|
525
|
+
model = self.model
|
|
526
|
+
if isinstance(model, ModelConfig):
|
|
527
|
+
return model.id
|
|
528
|
+
if isinstance(model, Mapping):
|
|
529
|
+
return model.get("id")
|
|
530
|
+
return model if isinstance(model, str) else None
|
|
531
|
+
|
|
481
532
|
|
|
482
533
|
class AgentVersion(BaseModel):
|
|
483
534
|
_fields = (
|
|
@@ -16,9 +16,9 @@ Python 3.8+ compatible.
|
|
|
16
16
|
|
|
17
17
|
from __future__ import annotations
|
|
18
18
|
|
|
19
|
-
from typing import Any, Mapping, Optional, Sequence
|
|
19
|
+
from typing import Any, Dict, Mapping, Optional, Sequence, Union
|
|
20
20
|
|
|
21
|
-
from dashscope.agentstudio.types.models import BaseModel
|
|
21
|
+
from dashscope.agentstudio.types.models import BaseModel, ModelConfig
|
|
22
22
|
|
|
23
23
|
_NOT_GIVEN = object()
|
|
24
24
|
|
|
@@ -31,6 +31,24 @@ def _to_mapping(value: Any) -> Any:
|
|
|
31
31
|
return value
|
|
32
32
|
|
|
33
33
|
|
|
34
|
+
def _resolve_model(
|
|
35
|
+
model: Optional[Union[str, ModelConfig]],
|
|
36
|
+
) -> Dict[str, Any]:
|
|
37
|
+
"""Wire ``model`` from a ModelConfig or a bare model id; id required."""
|
|
38
|
+
if model is None:
|
|
39
|
+
raise ValueError("model is required")
|
|
40
|
+
if isinstance(model, str):
|
|
41
|
+
model = ModelConfig(id=model)
|
|
42
|
+
if not isinstance(model, ModelConfig):
|
|
43
|
+
raise TypeError(
|
|
44
|
+
f"model must be a ModelConfig, got {type(model).__name__} "
|
|
45
|
+
"(use ModelConfig(**raw))",
|
|
46
|
+
)
|
|
47
|
+
if not model.id:
|
|
48
|
+
raise ValueError("model.id is required")
|
|
49
|
+
return model.to_dict()
|
|
50
|
+
|
|
51
|
+
|
|
34
52
|
# ===========================================================================
|
|
35
53
|
# Agents
|
|
36
54
|
# ===========================================================================
|
|
@@ -39,9 +57,10 @@ def _to_mapping(value: Any) -> Any:
|
|
|
39
57
|
class AgentCreateParams(BaseModel):
|
|
40
58
|
"""Request body for ``POST /agents``.
|
|
41
59
|
|
|
42
|
-
Maps to :meth:`Agents.create`. The SDK method exposes
|
|
43
|
-
|
|
44
|
-
|
|
60
|
+
Maps to :meth:`Agents.create`. The SDK method exposes ``model`` as a
|
|
61
|
+
:class:`ModelConfig` or a bare model id, and ``system_prompt`` as a
|
|
62
|
+
keyword arg; the wire format uses ``model: {"id": "…", …}`` and
|
|
63
|
+
``system``.
|
|
45
64
|
"""
|
|
46
65
|
|
|
47
66
|
_fields = (
|
|
@@ -60,7 +79,7 @@ class AgentCreateParams(BaseModel):
|
|
|
60
79
|
self,
|
|
61
80
|
*,
|
|
62
81
|
name: str,
|
|
63
|
-
model: str,
|
|
82
|
+
model: Union[str, ModelConfig],
|
|
64
83
|
description: Optional[str] = None,
|
|
65
84
|
system_prompt: Optional[str] = None,
|
|
66
85
|
tools: Optional[Sequence[Mapping[str, Any]]] = None,
|
|
@@ -71,7 +90,7 @@ class AgentCreateParams(BaseModel):
|
|
|
71
90
|
) -> None:
|
|
72
91
|
super().__init__(
|
|
73
92
|
name=name,
|
|
74
|
-
model=
|
|
93
|
+
model=_resolve_model(model),
|
|
75
94
|
description=description,
|
|
76
95
|
system=system_prompt,
|
|
77
96
|
tools=([dict(t) for t in tools] if tools is not None else None),
|
|
@@ -109,7 +128,7 @@ class AgentUpdateParams(BaseModel):
|
|
|
109
128
|
*,
|
|
110
129
|
version: int,
|
|
111
130
|
name: Optional[str] = None,
|
|
112
|
-
model: Optional[str] = None,
|
|
131
|
+
model: Optional[Union[str, ModelConfig]] = None,
|
|
113
132
|
description: Optional[str] = None,
|
|
114
133
|
system_prompt: Optional[str] = None,
|
|
115
134
|
tools: Optional[Sequence[Mapping[str, Any]]] = None,
|
|
@@ -121,7 +140,7 @@ class AgentUpdateParams(BaseModel):
|
|
|
121
140
|
super().__init__(
|
|
122
141
|
version=version,
|
|
123
142
|
name=name,
|
|
124
|
-
model=(
|
|
143
|
+
model=(_resolve_model(model) if model is not None else None),
|
|
125
144
|
description=description,
|
|
126
145
|
system=system_prompt,
|
|
127
146
|
tools=([dict(t) for t in tools] if tools is not None else None),
|
|
@@ -59,12 +59,19 @@ try:
|
|
|
59
59
|
ToolCall,
|
|
60
60
|
)
|
|
61
61
|
|
|
62
|
+
try: # Reasoning part exists in loongsuite-util-genai >= 0.4.0.
|
|
63
|
+
from opentelemetry.util.genai import types as _genai_types
|
|
64
|
+
|
|
65
|
+
Reasoning = getattr(_genai_types, "Reasoning", None)
|
|
66
|
+
except ImportError: # pragma: no cover - older genai util
|
|
67
|
+
Reasoning = None # type: ignore[assignment,misc]
|
|
68
|
+
|
|
62
69
|
GENAI_AVAILABLE = True
|
|
63
70
|
except ImportError: # pragma: no cover
|
|
64
71
|
get_extended_telemetry_handler = None # type: ignore[assignment]
|
|
65
72
|
ExecuteToolInvocation = None # type: ignore[assignment]
|
|
66
73
|
# type: ignore[assignment]
|
|
67
|
-
InputMessage = OutputMessage = Text = ToolCall = None
|
|
74
|
+
InputMessage = OutputMessage = Reasoning = Text = ToolCall = None
|
|
68
75
|
GENAI_AVAILABLE = False
|
|
69
76
|
|
|
70
77
|
_logger = logging.getLogger(__name__)
|
|
@@ -454,6 +454,23 @@ def openai_chat_messages_to_input_messages(
|
|
|
454
454
|
return out
|
|
455
455
|
|
|
456
456
|
|
|
457
|
+
def _reasoning_part(msg: Any) -> Any:
|
|
458
|
+
"""Return a ``Reasoning`` part when the message carries thinking content.
|
|
459
|
+
|
|
460
|
+
``None`` when the GenAI util is unavailable or the field is absent, so
|
|
461
|
+
callers keep their existing part ordering logic.
|
|
462
|
+
"""
|
|
463
|
+
if _core.Reasoning is None or msg is None:
|
|
464
|
+
return None
|
|
465
|
+
if isinstance(msg, Dict):
|
|
466
|
+
reasoning = msg.get("reasoning_content")
|
|
467
|
+
else:
|
|
468
|
+
reasoning = getattr(msg, "reasoning_content", None)
|
|
469
|
+
if not isinstance(reasoning, str) or not reasoning:
|
|
470
|
+
return None
|
|
471
|
+
return _core.Reasoning(content=reasoning)
|
|
472
|
+
|
|
473
|
+
|
|
457
474
|
def openai_completion_to_output_messages( # pylint: disable=too-many-branches
|
|
458
475
|
completion: Any,
|
|
459
476
|
) -> List[Any]:
|
|
@@ -513,6 +530,9 @@ def openai_completion_to_output_messages( # pylint: disable=too-many-branches
|
|
|
513
530
|
tool_calls = getattr(msg, "tool_calls", None)
|
|
514
531
|
if tool_calls:
|
|
515
532
|
parts.extend(tool_calls_to_parts(tool_calls))
|
|
533
|
+
reasoning_part = _reasoning_part(msg)
|
|
534
|
+
if reasoning_part is not None:
|
|
535
|
+
parts.insert(0, reasoning_part)
|
|
516
536
|
if not parts:
|
|
517
537
|
parts.append(_core.Text(content=""))
|
|
518
538
|
result.append(
|
|
@@ -561,6 +581,9 @@ def dashscope_response_to_output_messages(response: Any) -> List[Any]:
|
|
|
561
581
|
)
|
|
562
582
|
if tool_calls:
|
|
563
583
|
parts.extend(tool_calls_to_parts(tool_calls))
|
|
584
|
+
reasoning_part = _reasoning_part(msg)
|
|
585
|
+
if reasoning_part is not None:
|
|
586
|
+
parts.insert(0, reasoning_part)
|
|
564
587
|
if not parts:
|
|
565
588
|
parts.append(_core.Text(content=""))
|
|
566
589
|
result.append(
|
|
@@ -535,7 +535,7 @@ def _bind_tool_arguments(
|
|
|
535
535
|
bound = sig.bind_partial(*args, **kwargs)
|
|
536
536
|
bound.apply_defaults()
|
|
537
537
|
param_names = list(sig.parameters.keys())
|
|
538
|
-
raw =
|
|
538
|
+
raw = dict(bound.arguments)
|
|
539
539
|
if param_names and param_names[0] in ("self", "cls"):
|
|
540
540
|
raw = {k: v for k, v in raw.items() if k not in ("self", "cls")}
|
|
541
541
|
return _json_serializable(raw)
|
|
@@ -22,7 +22,7 @@ AgentStudio workspace (defaults to trial).
|
|
|
22
22
|
import os
|
|
23
23
|
|
|
24
24
|
import dashscope
|
|
25
|
-
from dashscope.agentstudio import user_message
|
|
25
|
+
from dashscope.agentstudio import ModelConfig, user_message
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def make_client():
|
|
@@ -48,10 +48,16 @@ def main() -> None:
|
|
|
48
48
|
print(f" environment_id={env.id}")
|
|
49
49
|
|
|
50
50
|
print("==> creating agent")
|
|
51
|
+
# model is a ModelConfig (a bare id string is the ModelConfig(id=...)
|
|
52
|
+
# shorthand); unset params keep the server defaults.
|
|
51
53
|
agent = studio.agents.create(
|
|
52
54
|
name="quickstart-agent",
|
|
53
55
|
system_prompt="You are a friendly demo agent. Reply briefly.",
|
|
54
|
-
model=
|
|
56
|
+
model=ModelConfig(
|
|
57
|
+
id="qwen3.8-max",
|
|
58
|
+
temperature=0.7,
|
|
59
|
+
max_tokens=4096,
|
|
60
|
+
),
|
|
55
61
|
tools=[
|
|
56
62
|
{
|
|
57
63
|
"type": "builtin_toolkit",
|
|
@@ -60,7 +66,7 @@ def main() -> None:
|
|
|
60
66
|
},
|
|
61
67
|
],
|
|
62
68
|
)
|
|
63
|
-
print(f" agent_id={agent.id}")
|
|
69
|
+
print(f" agent_id={agent.id} model={agent.model_id}")
|
|
64
70
|
|
|
65
71
|
print("==> creating session")
|
|
66
72
|
session = studio.sessions.create(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|