From 0caab13666dfecc26ee077ec01e385c0069f148d Mon Sep 17 00:00:00 2001 From: Robin Glauser Date: Sun, 4 Dec 2022 19:39:31 +0100 Subject: [PATCH] Updating example to not use new api (#33) --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3db1e2a..70f901d 100644 --- a/README.md +++ b/README.md @@ -41,12 +41,13 @@ or ### Using OpenAiService If you're looking for the fastest solution, import the `client` and use [OpenAiService](client/src/main/java/com/theokanning/openai/OpenAiService.java). ``` -OpenAiService service = new OpenAiService(your_token) +OpenAiService service = new OpenAiService("your_token"); CompletionRequest completionRequest = CompletionRequest.builder() .prompt("Somebody once told me the world is gonna roll me") + .model("ada") .echo(true) .build(); -service.createCompletion("ada", completionRequest).getChoices().forEach(System.out::println); +service.createCompletion( completionRequest).getChoices().forEach(System.out::println); ``` ### Using OpenAiApi Retrofit client