Skip to content
This repository was archived by the owner on Jun 6, 2024. It is now read-only.

Commit 0caab13

Browse files
authored
Updating example to not use new api (#33)
1 parent 5e14d4f commit 0caab13

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,13 @@ or
4141
### Using OpenAiService
4242
If you're looking for the fastest solution, import the `client` and use [OpenAiService](client/src/main/java/com/theokanning/openai/OpenAiService.java).
4343
```
44-
OpenAiService service = new OpenAiService(your_token)
44+
OpenAiService service = new OpenAiService("your_token");
4545
CompletionRequest completionRequest = CompletionRequest.builder()
4646
.prompt("Somebody once told me the world is gonna roll me")
47+
.model("ada")
4748
.echo(true)
4849
.build();
49-
service.createCompletion("ada", completionRequest).getChoices().forEach(System.out::println);
50+
service.createCompletion( completionRequest).getChoices().forEach(System.out::println);
5051
```
5152

5253
### Using OpenAiApi Retrofit client

0 commit comments

Comments
 (0)