Skip to content

Commit c879183

Browse files
committed
Fix tests
1 parent 6bb9222 commit c879183

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

test/eca/features/chat_test.clj

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
(on-message-received {:type :finish}))})]
3838
(is (match?
3939
{chat-id {:id chat-id
40-
:messages [{:role "user" :content "Hey!"}
41-
{:role "assistant" :content "Hey you!"}]}}
40+
:messages [{:role "user" :content [{:type :text :text "Hey!"}]}
41+
{:role "assistant" :content [{:type :text :text "Hey you!"}]}]}}
4242
(:chats (h/db))))
4343
(is (match?
4444
{:chat-content-received
@@ -117,8 +117,8 @@
117117
req-id-1 (:req-id res-1)]
118118
(is (match?
119119
{chat-id-1 {:id chat-id-1
120-
:messages [{:role "user" :content "Count with me: 1 mississippi"}
121-
{:role "assistant" :content "2 mississippi"}]}}
120+
:messages [{:role "user" :content [{:type :text :text "Count with me: 1 mississippi"}]}
121+
{:role "assistant" :content [{:type :text :text "2 mississippi"}]}]}}
122122
(:chats (h/db))))
123123
(is (match?
124124
{:chat-content-received
@@ -164,10 +164,10 @@
164164
req-id-2 (:req-id res-2)]
165165
(is (match?
166166
{chat-id-2 {:id chat-id-2
167-
:messages [{:role "user" :content "Count with me: 1 mississippi"}
168-
{:role "assistant" :content "2 mississippi"}
169-
{:role "user" :content "3 mississippi"}
170-
{:role "assistant" :content "4 mississippi"}]}}
167+
:messages [{:role "user" :content [{:type :text :text "Count with me: 1 mississippi"}]}
168+
{:role "assistant" :content [{:type :text :text "2 mississippi"}]}
169+
{:role "user" :content [{:type :text :text "3 mississippi"}]}
170+
{:role "assistant" :content [{:type :text :text "4 mississippi"}]}]}}
171171
(:chats (h/db))))
172172
(is (match?
173173
{:chat-content-received
@@ -223,14 +223,14 @@ for allowed directories and then list files"
223223
:contents [{:type :text :content "Allowed directories: /foo/bar"}]})})]
224224
(is (match?
225225
{chat-id {:id chat-id
226-
:messages [{:role "user" :content "List the files you are allowed to see"}
227-
{:role "assistant" :content "Ok, working on it"}
226+
:messages [{:role "user" :content [{:type :text :text "List the files you are allowed to see"}]}
227+
{:role "assistant" :content [{:type :text :text "Ok, working on it"}]}
228228
{:role "tool_call" :content {:id "call-1" :name "list_allowed_directories" :arguments {}}}
229229
{:role "tool_call_output" :content {:id "call-1" :name "list_allowed_directories" :arguments {}
230230
:output {:error false
231231
:contents [{:content "Allowed directories: /foo/bar"
232232
:type :text}]}}}
233-
{:role "assistant" :content "I can see: \n/foo/bar"}]}}
233+
{:role "assistant" :content [{:type :text :text "I can see: \n/foo/bar"}]}]}}
234234
(:chats (h/db))))
235235
(is (match?
236236
{:chat-content-received

0 commit comments

Comments
 (0)