Skip to content

Commit

Permalink
clientName != null
Browse files Browse the repository at this point in the history
  • Loading branch information
billytrend-cohere committed Aug 9, 2024
1 parent 35909e9 commit ad1a098
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/cohere/api/CohereBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public Cohere build() {
throw new RuntimeException("Please provide token or set the CO_API_KEY environment variable.");
}
this.clientOptionsBuilder.addHeader("Authorization", "Bearer " + this.token);
if (clientName.isPresent()) {
if (clientName != null) {
this.clientOptionsBuilder.addHeader("X-Client-Name", this.clientName);
}
clientOptionsBuilder.environment(this.environment);
Expand Down

0 comments on commit ad1a098

Please sign in to comment.