Gear-WenxinWorkshop-Starter 项目教程
wenxin-starter项目地址:https://gitcode.com/gh_mirrors/we/wenxin-starter
1. 项目的目录结构及介绍
gear-wenxinworkshop-starter/
├── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── io/
│ │ │ └── github/
│ │ │ └── gemingjia/
│ │ │ ├── config/
│ │ │ ├── model/
│ │ │ ├── service/
│ │ │ └── GearWenxinworkshopStarterApplication.java
│ │ └── resources/
│ │ ├── application.yml
│ │ └── application.properties
├── .gitignore
├── LICENSE
├── README.md
├── pom.xml
└── mvnw
目录结构介绍
src/main/java/io/github/gemingjia/
: 包含项目的所有Java源代码。config/
: 存放配置类文件。model/
: 存放数据模型类文件。service/
: 存放服务类文件。GearWenxinworkshopStarterApplication.java
: 项目的主启动类。
src/main/resources/
: 包含项目的资源文件。application.yml
: 主要的配置文件。application.properties
: 备用配置文件。
.gitignore
: Git忽略文件配置。LICENSE
: 项目许可证文件。README.md
: 项目说明文档。pom.xml
: Maven项目配置文件。mvnw
: Maven包装器脚本。
2. 项目的启动文件介绍
GearWenxinworkshopStarterApplication.java
package io.github.gemingjia;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class GearWenxinworkshopStarterApplication {
public static void main(String[] args) {
SpringApplication.run(GearWenxinworkshopStarterApplication.class, args);
}
}
介绍
GearWenxinworkshopStarterApplication.java
是项目的入口类,使用@SpringBootApplication
注解标记,表示这是一个Spring Boot应用。main
方法中调用SpringApplication.run
方法启动应用。
3. 项目的配置文件介绍
application.yml
gear:
wenxin:
access-token: xx_xxxxxxxxxx_xxxxxx_xxxxxxx_xxxx-xxxx
api-key: xxxxxxxxxxxxxxxxxxx
secret-key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
model-qps:
- Ernie: 10
- Lamma: 10
- ChatGLM: 10
application.properties
gear.wenxin.access-token=xx_xxxxxxxxxx_xxxxxx_xxxxxxx_xxxx-xxxx
介绍
application.yml
和application.properties
是项目的配置文件,用于配置各种参数。gear.wenxin.access-token
用于设置访问令牌。gear.wenxin.api-key
和gear.wenxin.secret-key
用于设置API密钥和密钥。gear.wenxin.model-qps
用于设置模型的QPS(每秒查询率)。
以上是 Gear-WenxinWorkshop-Starter
项目的教程,包含了项目的目录结构、启动文件和配置文件的详细介绍。希望对您有所帮助!
wenxin-starter项目地址:https://gitcode.com/gh_mirrors/we/wenxin-starter