阅读(903) 书签 (0)

通义千问安装DashScope SDK

2023-07-20 11:33 更新

DashScope灵积模型服务提供下列编程语言的SDK供开发者选择。请点击链接转到相应语言的SDK安装指南。

  • Python
  • Java
  • 更多编程语言的DashScope SDK将在稍后陆续提供。

Python

说明 

需要提前安装Python3.7及以上版本,请确保安装正确的python版本,可能需要pip3 install dashscope!

执行如下命令,通过pip安装SDK。

pip install dashscope

如需更新,可执行如下命令。

pip install dashscope --upgrade

Java

说明 

Java SDK支持java8及以上环境,可在maven网站查看版本号,依赖时将上述安装命令中的`the-latest-version`替换为最新版本。

通过执行如下命令来依赖Java SDK。

<!-- https://mvnrepository.com/artifact/com.alibaba/dashscope-sdk-java -->
<dependency>
    <groupId>com.alibaba</groupId>
    <artifactId>dashscope-sdk-java</artifactId>
    <version>the-latest-version</version>
</dependency>