Skip to content

Commit

Permalink
[HOTFIX]: Avoid to assign None value to self.api_key in dashscope cha…
Browse files Browse the repository at this point in the history
…t model wrapper (#335)
  • Loading branch information
xuanmiss authored Jul 12, 2024
1 parent bef70d9 commit 06a074a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/agentscope/models/dashscope_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ def __init__(
self.generate_args = generate_args or {}

self.api_key = api_key
dashscope.api_key = self.api_key
if self.api_key:
dashscope.api_key = self.api_key
self.max_length = None

# Set monitor accordingly
Expand Down

0 comments on commit 06a074a

Please sign in to comment.