From df787a1e149ef2eacf6fef7fc96f10ee71989698 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);