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

Commit

Permalink
Remove references to deprecated models (#438)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoKanning authored Dec 13, 2023
1 parent 84d2af1 commit e7de81c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ If you're looking for the fastest solution, import the `service` module and use
OpenAiService service = new OpenAiService("your_token");
CompletionRequest completionRequest = CompletionRequest.builder()
.prompt("Somebody once told me the world is gonna roll me")
.model("ada")
.model("babbage-002"")
.echo(true)
.build();
service.createCompletion(completionRequest).getChoices().forEach(System.out::println);
Expand Down
2 changes: 1 addition & 1 deletion example/src/main/java/example/OpenAiApiExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static void main(String... args) {

System.out.println("\nCreating completion...");
CompletionRequest completionRequest = CompletionRequest.builder()
.model("ada")
.model("babbage-002")
.prompt("Somebody once told me the world is gonna roll me")
.echo(true)
.user("testing")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class CompletionTest {
@Test
void createCompletion() {
CompletionRequest completionRequest = CompletionRequest.builder()
.model("ada")
.model("babbage-002")
.prompt("Somebody once told me the world is gonna roll me")
.echo(true)
.n(5)
Expand All @@ -39,7 +39,7 @@ void createCompletion() {
@Test
void streamCompletion() {
CompletionRequest completionRequest = CompletionRequest.builder()
.model("ada")
.model("babbage-002")
.prompt("Somebody once told me the world is gonna roll me")
.echo(true)
.n(1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class EmbeddingTest {
@Test
void createEmbeddings() {
EmbeddingRequest embeddingRequest = EmbeddingRequest.builder()
.model("text-similarity-babbage-001")
.model("text-embedding-ada-002")
.input(Collections.singletonList("The food was delicious and the waiter..."))
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ void listModels() {

@Test
void getModel() {
Model ada = service.getModel("ada");
Model model = service.getModel("babbage-002");

assertEquals("ada", ada.id);
assertEquals("openai", ada.ownedBy);
assertEquals("babbage-002", model.id);
assertEquals("system", model.ownedBy);
}
}

0 comments on commit e7de81c

Please sign in to comment.