From ad1a098e8eb26a4d140f92cba7f37432fc1d9feb Mon Sep 17 00:00:00 2001 From: Billy Trend Date: Wed, 8 May 2024 16:29:57 +0100 Subject: [PATCH] clientName != null --- src/main/java/com/cohere/api/CohereBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);