Using OpenRouter to access large models library
OpenRouter makes it super easy to just get best scores at school by using a large set of models available.
; claude-write-fibonacci
(require '[pyjama.openrouter.core :as openrouter])
(let [response (openrouter/with-prompt "Write Fibonacci in Clojure!")]
(println
(-> response :choices first :message :content)))
I actually wanted to evaluate answers from anthropic/claude-3.7-sonnet so that model is the default one for open router.
With a bit of rewriting around, we can get something vastly more generic, where the prompt and the model are simply calling openrouter/with-config.

