auto(11bf28807ce8): session end @ 2026-07-03T11:14:46 (+2f)
This commit is contained in:
1 parent
9a0f053792
commit
01a3059efa
2 files changed
+11
-4
No files matched your search
@@ -89,8 +89,11 @@ spring:
|
||||
ssoEventReceiver-in-0: {content-type: text/json, destination: MXK_IDENTITY_MAIN_TOPIC,
|
||||
group: maxkey_identity}
|
||||
ai:
|
||||
openai: {enabled: true, apiHost: 'https://api.minimaxi.com/v1/', apiKey: ['sk-cp-pI_Yq-u5HrclWaesyc1R98_yJfUC6c_Mwv7711VQ_p7NeFof96qSLJNlzxsNz0ahi6-LxunFQ5mqkW9exBsyxX-JX9egz9P84edge8j-WMTAXaJVFxEVYRY'], user-limit-count: 100, user-limit-time: 1s, total-limit-count: 5000, total-limit-time: 1m,
|
||||
chat: {mode: 'abab6.5s-chat', maxTokens: 2000, temperature: 0.85, topP: 0.8}}
|
||||
openai:
|
||||
user-limit-count: 1 # 单个用户限流:单位时间内最大请求数
|
||||
user-limit-time: 3s # 单个用户限流时间窗口(s=秒/m=分/h=时)
|
||||
total-limit-count: 500 # 全局限流:单位时间内最大请求数
|
||||
total-limit-time: 1m # 全局限流时间窗口
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath*:mapper/**/*.xml
|
||||
type-aliases-package: jnpf.**.entity,ssw.**.entity
|
||||
|
||||
@@ -78,8 +78,12 @@ public class SswLLMClient {
|
||||
body.put("messages", messages);
|
||||
|
||||
try {
|
||||
log.info("[SswLLMClient] POST {} model={} maxTokens={}", baseUrl, model, maxTokens);
|
||||
HttpResponse resp = HttpRequest.post(baseUrl)
|
||||
// v0.15+ (2026-07-03): base_ai 的 baseUrl 是 API 前缀 (如 https://api.deepseek.com/v1),
|
||||
// 实际 OpenAI-compatible endpoint 是 /v1/chat/completions.
|
||||
// 之前的 HttpRequest.post(baseUrl) 直接 POST 到 /v1, minimaxi 返 301, deepseek 返 404.
|
||||
String url = baseUrl.endsWith("/chat/completions") ? baseUrl : baseUrl + "/chat/completions";
|
||||
log.info("[SswLLMClient] POST {} model={} maxTokens={}", url, model, maxTokens);
|
||||
HttpResponse resp = HttpRequest.post(url)
|
||||
.header("Authorization", "Bearer " + credential)
|
||||
.header("Content-Type", "application/json")
|
||||
.body(body.toJSONString())
|
||||
|
||||
Reference in new issue
Block a user