|
|
@@ -29,7 +29,7 @@ import java.nio.charset.StandardCharsets;
|
|
29
|
29
|
@Service
|
|
30
|
30
|
public class KbOpenAiProxyServiceImpl implements KbOpenAiProxyService {
|
|
31
|
31
|
|
|
32
|
|
- private static final String PATH_MODELS = "/api/version";
|
|
|
32
|
+ private static final String PATH_VERSION = "/api/version";
|
|
33
|
33
|
private static final String PATH_CHAT = "/api/console/chat";
|
|
34
|
34
|
|
|
35
|
35
|
private final KbApiProperties properties;
|
|
|
@@ -49,7 +49,7 @@ public class KbOpenAiProxyServiceImpl implements KbOpenAiProxyService {
|
|
49
|
49
|
ensureReady();
|
|
50
|
50
|
try {
|
|
51
|
51
|
ResponseEntity<byte[]> upstream = restTemplate.exchange(
|
|
52
|
|
- properties.baseUrl() + PATH_MODELS,
|
|
|
52
|
+ properties.baseUrl() + PATH_VERSION,
|
|
53
|
53
|
HttpMethod.GET,
|
|
54
|
54
|
new HttpEntity<>(upstreamAuthHeaders()),
|
|
55
|
55
|
byte[].class);
|