main
HuangHai 2 months ago
parent 9389dcb857
commit d27fadf1ac

@ -54,5 +54,4 @@ public class AiPptDemo1 extends ApiKit {
HttpUtils.download(url, new File(savePath)); HttpUtils.download(url, new File(savePath));
System.out.println("ppt下载完成保存路径" + savePath); System.out.println("ppt下载完成保存路径" + savePath);
} }
} }

@ -1,8 +1,15 @@
# API站点
https://gptnb-go.apifox.cn/api-222928067
# 官网 # 官网
https://docmee.cn/ https://docmee.cn/
# 用户名与密码
18686619970
密码:手机验证码
# 体验 # 体验
https://www.veasion.cn/AiPPT/ https://www.veasion.cn/AiPPT/
# 充值
https://open.docmee.cn/open/workspace/top-up
# 模板选择【展示】
https://dsideal.obs.cn-north-1.myhuaweicloud.com/HuangHai/BlogImages/202505131336410.png

@ -31,7 +31,7 @@ public class ApiKit {
String configFile = "application_{?}.yaml".replace("{?}", getEnvPrefix()); String configFile = "application_{?}.yaml".replace("{?}", getEnvPrefix());
PropKit = new YamlProp(configFile); PropKit = new YamlProp(configFile);
BASE_URL = PropKit.get("AIPPT.BASE_URL"); BASE_URL = PropKit.get("AIPPT.BASE_URL");
apiKey = PropKit.get("GPTNB.sk"); apiKey = PropKit.get("AIPPT.API_KEY");
} }
@ -43,8 +43,10 @@ public class ApiKit {
HttpUtils.HttpRequest httpRequest = HttpUtils.HttpRequest.postJson(url); HttpUtils.HttpRequest httpRequest = HttpUtils.HttpRequest.postJson(url);
httpRequest.setBody(body.toJSONString()); httpRequest.setBody(body.toJSONString());
httpRequest.addHeaders("Api-Key", apiKey); httpRequest.addHeaders("Api-Key", apiKey);
httpRequest.addHeaders("Content-Type", "application/json");
HttpUtils.HttpResponse response = HttpUtils.request(httpRequest); HttpUtils.HttpResponse response = HttpUtils.request(httpRequest);
if (response.getStatus() != 200) { if (response.getStatus() != 200) {
System.out.println(response.getResponseToString());
throw new RuntimeException("创建apiToken失败httpStatus=" + response.getStatus()); throw new RuntimeException("创建apiToken失败httpStatus=" + response.getStatus());
} }
JSONObject result = response.getResponseToJson(); JSONObject result = response.getResponseToJson();

@ -75,4 +75,5 @@ GPTNB:
# 人工智能生成PPT # 人工智能生成PPT
AIPPT: AIPPT:
BASE_URL: https://goapi.gptnb.ai/docmee/v1 BASE_URL: https://open.docmee.cn
API_KEY: ak_uKoKrRF63333E2lcBq

@ -75,4 +75,5 @@ GPTNB:
# 人工智能生成PPT # 人工智能生成PPT
AIPPT: AIPPT:
BASE_URL: https://docmee.cn BASE_URL: https://open.docmee.cn
API_KEY: ak_uKoKrRF63333E2lcBq

@ -75,4 +75,5 @@ GPTNB:
# 人工智能生成PPT # 人工智能生成PPT
AIPPT: AIPPT:
BASE_URL: https://goapi.gptnb.ai/docmee/v1 BASE_URL: https://open.docmee.cn
API_KEY: ak_uKoKrRF63333E2lcBq

@ -75,4 +75,5 @@ GPTNB:
# 人工智能生成PPT # 人工智能生成PPT
AIPPT: AIPPT:
BASE_URL: https://docmee.cn BASE_URL: https://open.docmee.cn
API_KEY: ak_uKoKrRF63333E2lcBq
Loading…
Cancel
Save