Skip to content

Commit

Permalink
Update README.md (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
billytrend-cohere authored Jul 9, 2024
1 parent 19ab61e commit 8af467d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Add the dependency in your `pom.xml`:
import com.cohere.api.Cohere;
import com.cohere.api.requests.ChatRequest;
import com.cohere.api.types.ChatMessage;
import com.cohere.api.types.ChatMessageRole;
import com.cohere.api.types.Message;
import com.cohere.api.types.NonStreamedChatResponse;

import java.util.List;
Expand All @@ -56,8 +56,8 @@ public class ChatPost {
ChatRequest.builder()
.message("What year was he born?")
.chatHistory(
List.of(ChatMessage.builder().role(ChatMessageRole.USER).message("Who discovered gravity?").build(),
ChatMessage.builder().role(ChatMessageRole.CHATBOT).message("The man who is widely credited with discovering gravity is Sir Isaac Newton").build())).build());
List.of(Message.user(ChatMessage.builder().message("Who discovered gravity?").build()),
Message.chatbot(ChatMessage.builder().message("The man who is widely credited with discovering gravity is Sir Isaac Newton").build()))).build());

System.out.println(response);
}
Expand Down

0 comments on commit 8af467d

Please sign in to comment.