39 lines
1.4 KiB
Java
39 lines
1.4 KiB
Java
package com.nanri.aiimage.config;
|
|
|
|
import lombok.Data;
|
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
@Data
|
|
@ConfigurationProperties(prefix = "aiimage.appearance-patent")
|
|
public class AppearancePatentProperties {
|
|
private String cozeBaseUrl = "https://api.coze.cn";
|
|
private String cozeWorkflowPath = "/v1/workflow/run";
|
|
private String cozeWorkflowHistoryPath = "/v1/workflows/{workflow_id}/run_histories/{execute_id}";
|
|
private String cozeWorkflowId = "7632683471312355338";
|
|
private String cozeToken = "";
|
|
private List<CozeCredential> cozeCredentials = new ArrayList<>();
|
|
private int cozeCredentialStripeSize = 5;
|
|
private int cozeBatchSize = 10;
|
|
private int cozeConnectTimeoutMillis = 10000;
|
|
private int cozeReadTimeoutMillis = 60000;
|
|
private int cozePollIntervalMillis = 30000;
|
|
private int cozePollTimeoutMillis = 600000;
|
|
private int staleTimeoutMinutes = 30;
|
|
private String staleFinalizeCron = "0 */2 * * * *";
|
|
/**
|
|
* 末尾不足一批的数据等待该时长后强制提交 Coze。
|
|
* Python 回传超时后会直接封口;这个配置处理 Python 慢回传但仍未超时的零头批次。
|
|
*/
|
|
private int cozeFlushPendingMinutes = 1;
|
|
|
|
@Data
|
|
public static class CozeCredential {
|
|
private String name;
|
|
private String workflowId;
|
|
private String token;
|
|
}
|
|
}
|