Skip to content

Commit 6f304e9

Browse files
committed
Fix exception
1 parent 833dd97 commit 6f304e9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/eca/features/chat.clj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
[eca.llm-api :as llm-api]
1717
[eca.logger :as logger]
1818
[eca.messenger :as messenger]
19-
[eca.shared :as shared :refer [assoc-some]]
20-
[eca.metrics :as metrics]))
19+
[eca.metrics :as metrics]
20+
[eca.shared :as shared :refer [assoc-some]]))
2121

2222
(set! *warn-on-reflection* true)
2323

@@ -468,12 +468,12 @@
468468
:tools []
469469
:provider-auth provider-auth})]
470470
(let [title (-> title
471-
(subs 0 32)
471+
(subs 0 (min (count title) 30))
472472
string/capitalize)]
473473
(swap! db* assoc-in [:chats chat-id :title] title)
474474
(send-content! chat-ctx :system (assoc-some
475-
{:type :metadata}
476-
:title title))))))
475+
{:type :metadata}
476+
:title title))))))
477477
(send-content! chat-ctx :system {:type :progress
478478
:state :running
479479
:text "Waiting model"})

0 commit comments

Comments
 (0)