Skip to content

Commit

Permalink
Complain about missing api keys
Browse files Browse the repository at this point in the history
  • Loading branch information
slimslenderslacks committed Dec 17, 2024
1 parent 9ca1339 commit 069be4a
Show file tree
Hide file tree
Showing 22 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "docs/quickstart/themes/ananke"]
path = docs/quickstart/themes/ananke
path = docs/themes/ananke
url = https://github.com/theNewDynamic/gohugo-theme-ananke.git
File renamed without changes.
File renamed without changes.
File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion src/claude.clj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
(defn claude-api-key []
(try
(string/trim (slurp (io/file (or (System/getenv "CLAUDE_API_KEY_LOCATION") (System/getenv "HOME")) ".claude-api-key")))
(catch Throwable _ nil)))
(catch Throwable _
(throw (ex-info "Unable to read claude-api-key secret" {})))))

(defn parse-sse [s]
(when (string/starts-with? s "data:")
Expand Down
4 changes: 2 additions & 2 deletions src/openai.clj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
[cheshire.core :as json]
[clojure.core.async :as async]
[clojure.java.io :as io]
[clojure.spec.alpha :as s]
[clojure.string :as string]
[jsonrpc]))

Expand All @@ -13,7 +12,8 @@
(defn openai-api-key []
(try
(string/trim (slurp (io/file (or (System/getenv "OPENAI_API_KEY_LOCATION") (System/getenv "HOME")) ".openai-api-key")))
(catch Throwable _ nil)))
(catch Throwable _
(throw (ex-info "Unable to read openai api-key secret" {})))))

(defn openai
"get a response
Expand Down

0 comments on commit 069be4a

Please sign in to comment.