Commit abbcba76 authored by zhouwei's avatar zhouwei

新增大模型耗时日志

parent b4190407
......@@ -727,12 +727,13 @@ public class AIServiceImpl implements AIService {
HttpEntity header = getHeader(apiKey);
HttpEntity<String> entity = new HttpEntity<>(writeValueAsString, header.getHeaders());
ResponseEntity<ChatCompletionResponse> response;
long start = System.currentTimeMillis();
if(chatInputData.getModel().startsWith("qwen")){
response = restTemplate.postForEntity(QWEN, entity, ChatCompletionResponse.class);
}else {
response = restTemplate.postForEntity(DEEP_SEEK_URL, entity, ChatCompletionResponse.class);
}
log.info("耗时:{} model:{} apiKey:{}", System.currentTimeMillis() - start, chatInputData.getModel(), apiKey);
if (response.getStatusCode().is2xxSuccessful()) {
log.info("ai response:{}",JSONObject.toJSONString(response.getBody()));
return response.getBody();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment