chatGptApiSdk
chatGptApiSdk copied to clipboard
这里如何记录联系对话
@Test public void completionsContext() throws ApiException { CompletionReq req = CompletionReq.builder().model(Model.TEXT_DAVINCI_003.getName()) .stop("[" Human:", " Bot:"]").prompt("Human: 你好").build(); CompletionRes res = service.completions(req); System.out.println(JSONObject.toJSONString(res)); req.setPrompt(res.getAnswer() + "\n" + "Human: 你叫什么"); res = service.completions(req); System.out.println(JSONObject.toJSONString(res)); }
这里如何记录联系对话