openai-java icon indicating copy to clipboard operation
openai-java copied to clipboard

Updating example to not use new api

Open nahakiole opened this issue 3 years ago • 0 comments

/** Use {@link OpenAiService#createCompletion(CompletionRequest)} and {@link CompletionRequest#model}instead */
@Deprecated
public CompletionResult createCompletion(String engineId, CompletionRequest request)

The example in the readme uses the old completion, which should be updated as it is the one people probably use at first. I've also formatted it so after pasting it into an editor you won't get syntax errors. (Added semicolon and made API key a string)

nahakiole avatar Sep 19 '22 07:09 nahakiole