File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed
Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 1818 {:openaiApiKey nil
1919 :anthropicApiKey nil
2020 :rules []
21- :mcpTimeoutSeconds 10
21+ :mcpTimeoutSeconds 30
2222 :mcpServers []
2323 :ollama {:host " http://localhost"
2424 :port 11434
Original file line number Diff line number Diff line change 3131 (apply on-first-message-received args))
3232 (apply on-message-received args))
3333 tools (when (:mcp-tools model-config)
34- (map mcp-tool->llm-tool mcp-tools))
34+ (mapv mcp-tool->llm-tool mcp-tools))
3535 web-search (:web-search model-config)]
3636 (cond
3737 (contains? #{" o4-mini"
Original file line number Diff line number Diff line change 2222(defn ^:private base-completion-request! [{:keys [body api-key on-error on-response]}]
2323 (let [api-key (or api-key
2424 (System/getenv " OPENAI_API_KEY" ))]
25+ (logger/debug logger-tag (format " Sending input: '%s' instructions: '%s' tools: '%s'"
26+ (:input body)
27+ (:instructions body)
28+ (:tools body)))
2529 (http/post
2630 (url responses-path)
2731 {:headers {" Authorization" (str " Bearer " api-key)
4852 :or {temperature 1.0 }}
4953 {:keys [on-message-received on-error on-tool-called]}]
5054 (let [input (conj past-messages {:role " user" :content user-prompt})
51- _ (logger/debug logger-tag (format " Sending input: '%s' instructions: '%s'" input context))
55+ tools (cond-> tools
56+ web-search (conj {:type " web_search_preview" }))
5257 body {:model model
5358 :input input
5459 :user (str (System/getProperty " user.name" ) " @ECA" )
5560 :instructions context
5661 :temperature temperature
57- :tools (cond-> tools
58- web-search (conj {:type " web_search_preview" }))
62+ :tools tools
5963 :stream true }
6064 on-response-fn (fn handle-response [event data]
6165 (llm-util/log-response logger-tag event data)
You can’t perform that action at this time.
0 commit comments