mirror of
https://github.com/YuWanTingbb/unofficial-gpt4.git
synced 2025-10-13 21:51:23 +00:00
feat 代码注解
This commit is contained in:
@@ -657,6 +657,12 @@ public class ChatController {
|
||||
return getObjectResponseEntity(response, future);
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回异步responseEntity
|
||||
*
|
||||
* @param response
|
||||
* future
|
||||
*/
|
||||
private ResponseEntity<Object> getObjectResponseEntity(HttpServletResponse response, CompletableFuture<ResponseEntity<Object>> future) {
|
||||
ResponseEntity<Object> responseEntity;
|
||||
|
||||
@@ -674,6 +680,12 @@ public class ChatController {
|
||||
return responseEntity;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取url和apiKey
|
||||
* @param authorizationHeader
|
||||
* @param conversation
|
||||
* @throws IOException
|
||||
*/
|
||||
private String[] extractApiKeyAndRequestUrl(String authorizationHeader, Conversation conversation) throws IllegalArgumentException {
|
||||
if (conversation == null) {
|
||||
throw new IllegalArgumentException("Request body is missing or not in JSON format");
|
||||
|
Reference in New Issue
Block a user