-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathreasoning_effort.clj
More file actions
22 lines (19 loc) · 967 Bytes
/
reasoning_effort.clj
File metadata and controls
22 lines (19 loc) · 967 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
(ns reasoning-effort
"Demonstrates setting the reasoning effort level for a session.
The :reasoning-effort option accepts \"low\", \"medium\", \"high\", or \"xhigh\"
and controls how much reasoning the model applies to its responses."
(:require [github.copilot-sdk :as copilot]
[github.copilot-sdk.helpers :as h]))
;; See examples/README.md for usage
(def defaults
{:prompt "What is the capital of France? Answer in one sentence."
:effort "low"})
(defn run
[{:keys [prompt effort] :or {prompt (:prompt defaults) effort (:effort defaults)}}]
(println "Reasoning effort:" effort)
(copilot/with-client-session [session {:on-permission-request copilot/approve-all
:model "gpt-5.4"
:reasoning-effort effort
:available-tools []}]
(println "Q:" prompt)
(println "🤖:" (h/query prompt :session session))))