File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 113113 [provider model] (string/split full-model #"/" 2 )
114114 past-messages (get-in db [:chats chat-id :messages ] [])
115115 all-tools (f.tools/all-tools behavior @db* config)
116- provider-auth (get-in db [:auth provider])
117116 received-msgs* (atom " " )
118117 received-thinking* (atom " " )
119118 add-to-history! (fn [msg]
120119 (swap! db* update-in [:chats chat-id :messages ] (fnil conj []) msg))]
121- (when-let [expires-at (:expires-at provider-auth )]
120+ (when-let [expires-at (get-in db [ :auth provider :expires-at ] )]
122121 (when (<= (long expires-at) (quot (System/currentTimeMillis ) 1000 ))
123122 (send-content! chat-ctx :system {:type :progress
124123 :state :running
137136 :past-messages past-messages
138137 :config config
139138 :tools all-tools
140- :provider-auth provider- auth
139+ :provider-auth ( get-in @db* [ : auth provider])
141140 :on-first-response-received (fn [& _]
142141 (assert-chat-not-stopped! chat-ctx)
143142 (doseq [message user-messages]
Original file line number Diff line number Diff line change 9191 :function content}]}
9292 " tool_call_output" {:role " tool" :content (llm-util/stringfy-tool-result content)}
9393 " reason" {:role " assistant" :content (:text content)}
94- msg))
94+ {:role (:role msg)
95+ :content (-> msg :content first :text )}))
9596 past-messages))
9697
9798(defn completion! [{:keys [model user-messages reason? instructions api-url past-messages tools]}
You can’t perform that action at this time.
0 commit comments