Skip to content

Build and run agents you can see, understand and trust.

[HotFix] Fix no api_key bug in DashScopeMultiModalEmbedding (#846)

qbcda5a6e9479a9
diff --git a/src/agentscope/embedding/_dashscope_multimodal_embedding.py b/src/agentscope/embedding/_dashscope_multimodal_embedding.py
index 2f53ad74d..f8a50a156 100644
--- a/src/agentscope/embedding/_dashscope_multimodal_embedding.py
+++ b/src/agentscope/embedding/_dashscope_multimodal_embedding.py
@@ -216,6 +216,8 @@ class DashScopeMultiModalEmbedding(EmbeddingModelBase):
import dashscope
+ kwargs["api_key"] = self.api_key
+
start_time = datetime.now()
res = dashscope.MultiModalEmbedding.call(**kwargs)
time = (datetime.now() - start_time).total_seconds()