USVT-138 Change token for GPT

This commit is contained in:
YuCheng Hu 2023-03-22 13:17:00 -04:00
parent fb2c6e95d5
commit 5f467b5328
1 changed files with 3 additions and 6 deletions

View File

@ -21,12 +21,9 @@ import java.time.Instant;
import java.util.HashMap; import java.util.HashMap;
import java.util.concurrent.*; import java.util.concurrent.*;
/** /**
* Created with IntelliJ IDEA. * ChatGPTService to process ChatGPT related
*
* @author XieYang, YuCheng
* @Date: 2022/10/14/16:17
* @Description:
*/ */
@Service @Service
@Slf4j @Slf4j
@ -107,7 +104,7 @@ public class ChatGPTService {
*/ */
private String getChatGPTContent(String content) { private String getChatGPTContent(String content) {
log.debug(">>>>>>>> ChatGPT Content Call"); log.debug(">>>>>>>> ChatGPT Content Call");
OpenAiService service = new OpenAiService("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", 30); OpenAiService service = new OpenAiService("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", 30);
CompletionRequest completionRequest = new CompletionRequestBuilder().setModel("text-davinci-003") CompletionRequest completionRequest = new CompletionRequestBuilder().setModel("text-davinci-003")
.setPrompt(content) .setPrompt(content)
.setMaxTokens(500) .setMaxTokens(500)