Gear-WenxinWorkshop-Starter 项目教程

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.ymlapplication.properties 是项目的配置文件,用于配置各种参数。
  • gear.wenxin.access-token 用于设置访问令牌。
  • gear.wenxin.api-keygear.wenxin.secret-key 用于设置API密钥和密钥。
  • gear.wenxin.model-qps 用于设置模型的QPS(每秒查询率)。

以上是 Gear-WenxinWorkshop-Starter 项目的教程,包含了项目的目录结构、启动文件和配置文件的详细介绍。希望对您有所帮助!

wenxin-starter项目地址:https://gitcode.com/gh_mirrors/we/wenxin-starter

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

伍辰惟

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值