fix: 三方对接数据
This commit is contained in:
parent
592c2595d6
commit
fec303b68c
|
|
@ -98,7 +98,7 @@ public class ByteApiController extends BaseController {
|
||||||
ByteBodyReq byteBodyReq = new ByteBodyReq();
|
ByteBodyReq byteBodyReq = new ByteBodyReq();
|
||||||
// model由前端传入,默认为Seedance 2.0
|
// model由前端传入,默认为Seedance 2.0
|
||||||
byteBodyReq.setModel(StringUtils.isNotEmpty(request.getModel()) ?
|
byteBodyReq.setModel(StringUtils.isNotEmpty(request.getModel()) ?
|
||||||
request.getModel() : "ep-20260326165811-dlkth");
|
request.getModel() : "doubao-seedance-2.0");
|
||||||
byteBodyReq.setPrompt(text);
|
byteBodyReq.setPrompt(text);
|
||||||
byteBodyReq.setSequential_image_generation("disabled");
|
byteBodyReq.setSequential_image_generation("disabled");
|
||||||
byteBodyReq.setResponse_format("url");
|
byteBodyReq.setResponse_format("url");
|
||||||
|
|
@ -256,7 +256,7 @@ public class ByteApiController extends BaseController {
|
||||||
ByteBodyReq byteBodyReq = new ByteBodyReq();
|
ByteBodyReq byteBodyReq = new ByteBodyReq();
|
||||||
// model由前端传入,默认为Seedance2.0
|
// model由前端传入,默认为Seedance2.0
|
||||||
byteBodyReq.setModel(StringUtils.isNotEmpty(request.getModel()) ?
|
byteBodyReq.setModel(StringUtils.isNotEmpty(request.getModel()) ?
|
||||||
request.getModel() : "ep-20260326165811-dlkth");
|
request.getModel() : "doubao-seedance-2.0");
|
||||||
byteBodyReq.setCallback_url(volcCallbackUrl);
|
byteBodyReq.setCallback_url(volcCallbackUrl);
|
||||||
|
|
||||||
// 构建符合火山引擎格式的content
|
// 构建符合火山引擎格式的content
|
||||||
|
|
|
||||||
|
|
@ -224,14 +224,14 @@ tencentCos:
|
||||||
# domain: https://images.iqyjsnwv.com/
|
# domain: https://images.iqyjsnwv.com/
|
||||||
|
|
||||||
byteapi:
|
byteapi:
|
||||||
url: https://ark.ap-southeast.bytepluses.com/api/v3
|
url: http://zlhub.xiaowaiyou.cn/zhonglian
|
||||||
apiKey:
|
apiKey:
|
||||||
callBackUrl: https://undressing.top
|
callBackUrl: https://undressing.top
|
||||||
|
|
||||||
# 火山引擎 Ark API (Seedance 2.0)
|
# 火山引擎 Ark API (Seedance 2.0)
|
||||||
volcengine:
|
volcengine:
|
||||||
ark:
|
ark:
|
||||||
baseUrl: https://ark.cn-beijing.volces.com
|
baseUrl: http://zlhub.xiaowaiyou.cn/zhonglian
|
||||||
apiKey:
|
apiKey:
|
||||||
callbackUrl: https://undressing.top/api/ai/volcCallback
|
callbackUrl: https://undressing.top/api/ai/volcCallback
|
||||||
|
|
||||||
|
|
@ -241,15 +241,13 @@ portal:
|
||||||
# 与库表 ai_manager.type 一致(用于扣费);若报错 functionType does not exist,请插入对应 type 或改此处与库一致
|
# 与库表 ai_manager.type 一致(用于扣费);若报错 functionType does not exist,请插入对应 type 或改此处与库一致
|
||||||
function-type: "21"
|
function-type: "21"
|
||||||
defaults:
|
defaults:
|
||||||
model: ep-20260326165811-dlkth
|
model: doubao-seedance-2.0
|
||||||
duration: 4
|
duration: 4
|
||||||
resolution: 720p
|
resolution: 720p
|
||||||
ratio: "3:4"
|
ratio: "3:4"
|
||||||
models:
|
models:
|
||||||
- label: Seedance 2.0
|
- label: Seedance 2.0
|
||||||
value: ep-20260326165811-dlkth
|
value: doubao-seedance-2.0
|
||||||
- label: Seedance 2.0 Fast
|
|
||||||
value: ep-20260326170056-dkj9m
|
|
||||||
ratios:
|
ratios:
|
||||||
- "16:9"
|
- "16:9"
|
||||||
- "9:16"
|
- "9:16"
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ public class ByteService implements IByteService {
|
||||||
String jsonBody = objectMapper.writeValueAsString(req);
|
String jsonBody = objectMapper.writeValueAsString(req);
|
||||||
|
|
||||||
Request request = new Request.Builder()
|
Request request = new Request.Builder()
|
||||||
.url(volcBaseUrl + "/api/v3/contents/generations/tasks")
|
.url(volcBaseUrl + "/api/v1/proxy/ark/contents/generations/tasks")
|
||||||
.header("Content-Type", "application/json")
|
.header("Content-Type", "application/json")
|
||||||
.header("Authorization", "Bearer " + arkApiKey)
|
.header("Authorization", "Bearer " + arkApiKey)
|
||||||
.post(RequestBody.create(
|
.post(RequestBody.create(
|
||||||
|
|
@ -138,7 +138,7 @@ public class ByteService implements IByteService {
|
||||||
}
|
}
|
||||||
|
|
||||||
Request request = new Request.Builder()
|
Request request = new Request.Builder()
|
||||||
.url(volcBaseUrl + "/api/v3/contents/generations/tasks/" + id)
|
.url(volcBaseUrl + "/api/v1/proxy/ark/contents/generations/tasks/" + id)
|
||||||
.header("Content-Type", "application/json")
|
.header("Content-Type", "application/json")
|
||||||
.header("Authorization", "Bearer " + arkApiKey)
|
.header("Authorization", "Bearer " + arkApiKey)
|
||||||
.get()
|
.get()
|
||||||
|
|
@ -175,7 +175,7 @@ public class ByteService implements IByteService {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Request request = new Request.Builder()
|
Request request = new Request.Builder()
|
||||||
.url(volcBaseUrl + "/api/v3/contents/generations/tasks/" + id)
|
.url(volcBaseUrl + "/api/v1/proxy/ark/contents/generations/tasks/" + id)
|
||||||
.header("Content-Type", "application/json")
|
.header("Content-Type", "application/json")
|
||||||
.header("Authorization", "Bearer " + arkApiKey)
|
.header("Authorization", "Bearer " + arkApiKey)
|
||||||
.delete()
|
.delete()
|
||||||
|
|
@ -202,7 +202,7 @@ public class ByteService implements IByteService {
|
||||||
int pn = pageNum > 0 ? pageNum : 1;
|
int pn = pageNum > 0 ? pageNum : 1;
|
||||||
int ps = pageSize > 0 ? Math.min(pageSize, 500) : 10;
|
int ps = pageSize > 0 ? Math.min(pageSize, 500) : 10;
|
||||||
|
|
||||||
HttpUrl parsed = HttpUrl.parse(volcBaseUrl + "/api/v3/contents/generations/tasks");
|
HttpUrl parsed = HttpUrl.parse(volcBaseUrl + "/api/v1/proxy/ark/contents/generations/tasks");
|
||||||
if (parsed == null) {
|
if (parsed == null) {
|
||||||
throw new Exception("listVideoGenerationTasks error:invalid base url");
|
throw new Exception("listVideoGenerationTasks error:invalid base url");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue