cl-openai/auth.lisp
2024-09-09 20:58:41 -04:00

9 lines
249 B
Common Lisp

(in-package #:cl-openai)
(defparameter +openai-api-key+
(string-trim '(#\Newline #\Return)
(uiop:read-file-string "~/.openai-api-key.txt")))
(defun bearer-auth ()
`((Authorization . ,(format nil "Bearer ~a" +openai-api-key+))))