Skip to content

Commit

Permalink
fix dashscope high version problem
Browse files Browse the repository at this point in the history
  • Loading branch information
better629 committed Oct 10, 2024
1 parent 325e452 commit c023a23
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions metagpt/provider/dashscope_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,17 @@ def build_api_arequest(
request_timeout,
form,
resources,
base_address,
_,
) = _get_protocol_params(kwargs)
task_id = kwargs.pop("task_id", None)
if api_protocol in [ApiProtocol.HTTP, ApiProtocol.HTTPS]:
if not dashscope.base_http_api_url.endswith("/"):
http_url = dashscope.base_http_api_url + "/"
if base_address is None:
base_address = dashscope.base_http_api_url
if not base_address.endswith("/"):
http_url = base_address + "/"
else:
http_url = dashscope.base_http_api_url
http_url = base_address

if is_service:
http_url = http_url + SERVICE_API_PATH + "/"
Expand Down

0 comments on commit c023a23

Please sign in to comment.