You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hybrid thinking models can expose their reasoning process separately from the final answer via `enable_thinking` (requires `stream=True`); the reasoning appears in `message.reasoning_content`, the final answer in `message.content`:
128
+
129
+
```python
130
+
from dashscope import Generation
131
+
132
+
responses = Generation.call(
133
+
model="qwen-plus",
134
+
messages=[{"role": "user", "content": "Which is bigger, 1.1 or 0.9?"}],
135
+
result_format="message",
136
+
enable_thinking=True,
137
+
incremental_output=True,
138
+
stream=True,
139
+
)
140
+
for response in responses:
141
+
message = response.output.choices[0].message
142
+
print(message.get("reasoning_content") or message.content, end="")
143
+
```
144
+
96
145
### Error Handling
97
146
98
147
Missing required arguments (e.g. no `model`, no `messages`/`prompt`, no API
@@ -321,6 +370,45 @@ async def main():
321
370
asyncio.run(main())
322
371
```
323
372
373
+
Video is passed as a list of frame image URLs/paths (not a single video file):
Every field that accepts a URL (`image`, `audio`, `video` in messages; `images` on `ImageSynthesis`, etc.) also accepts a local file path — the SDK uploads it to OSS automatically, no manual header needed:
Use the explicit item classes to combine text/image/audio into a single fused vector (each requires a `factor` weight, and `enable_fusion` on `qwen3-vl-embedding`):
457
+
458
+
```python
459
+
from dashscope import MultiModalEmbedding
460
+
from dashscope.embeddings.multimodal_embedding import (
461
+
MultiModalEmbeddingItemText,
462
+
MultiModalEmbeddingItemImage,
463
+
)
464
+
465
+
resp = MultiModalEmbedding.call(
466
+
model="qwen3-vl-embedding",
467
+
input=[
468
+
MultiModalEmbeddingItemText(text="a red sports car", factor=1.0),
0 commit comments