Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,7 @@ public OpenAIResponse chatCompletion(OpenAIRequest request) {
try {
// 智能构建endpoint,避免重复的/v1路径
String endpoint;
if (baseUrl.endsWith("/v1") || baseUrl.contains("/v1/")) {
// baseUrl已包含v1路径,直接添加chat/completions
endpoint = baseUrl + (baseUrl.endsWith("/") ? "" : "/") + "chat/completions";
} else {
// baseUrl不包含v1路径,添加完整路径
endpoint = baseUrl + "/v1/chat/completions";
}
endpoint = baseUrl;
String requestBody = JSON.toJSONString(request);

log.debug("发送请求到: {}", endpoint);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,4 @@
public class QATypeConstant {
public static final String FORM_QA = "form";
public static final String TEXT_QA = "text";



}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.alibaba.fastjson2.JSONObject;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.github.timemachinelab.core.qatree.QaTree;
import io.github.timemachinelab.core.qatree.QaTreeNode;
import io.github.timemachinelab.core.serializable.JsonNode;
Expand Down
Loading