diff --git a/src/main/java/com/cohere/api/CohereBuilder.java b/src/main/java/com/cohere/api/CohereBuilder.java index e6fa445..133039f 100644 --- a/src/main/java/com/cohere/api/CohereBuilder.java +++ b/src/main/java/com/cohere/api/CohereBuilder.java @@ -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);