USVT-136 GPT 超时时间设置为 30s
This commit is contained in:
parent
79481d5118
commit
9cdaa97974
|
@ -107,7 +107,7 @@ public class ChatGPTService {
|
|||
*/
|
||||
private String getChatGPTContent(String content) {
|
||||
log.debug(">>>>>>>> ChatGPT Content Call");
|
||||
OpenAiService service = new OpenAiService("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");
|
||||
OpenAiService service = new OpenAiService("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", 30);
|
||||
CompletionRequest completionRequest = new CompletionRequestBuilder().setModel("text-davinci-003")
|
||||
.setPrompt(content)
|
||||
.setMaxTokens(500)
|
||||
|
@ -120,7 +120,6 @@ public class ChatGPTService {
|
|||
content = service.createCompletion(completionRequest).getChoices().get(0).getText();
|
||||
|
||||
|
||||
|
||||
return content;
|
||||
}
|
||||
|
||||
|
|
|
@ -43,12 +43,12 @@ class OpenAiTest {
|
|||
}
|
||||
|
||||
|
||||
// @Test
|
||||
@Test
|
||||
public void testToWeChatMessage() {
|
||||
|
||||
OpenAiService service = new OpenAiService("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");
|
||||
OpenAiService service = new OpenAiService("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", 30);
|
||||
CompletionRequest completionRequest = new CompletionRequestBuilder()
|
||||
.setPrompt("Python")
|
||||
.setPrompt("雷达与热成像等其他技术监测火灾效果对比")
|
||||
.setModel("text-davinci-003")
|
||||
.setMaxTokens(1000)
|
||||
.setEcho(true)
|
||||
|
|
Loading…
Reference in New Issue