|
37 | 37 | (on-message-received {:type :finish}))})] |
38 | 38 | (is (match? |
39 | 39 | {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!"}]}]}} |
42 | 42 | (:chats (h/db)))) |
43 | 43 | (is (match? |
44 | 44 | {:chat-content-received |
|
117 | 117 | req-id-1 (:req-id res-1)] |
118 | 118 | (is (match? |
119 | 119 | {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"}]}]}} |
122 | 122 | (:chats (h/db)))) |
123 | 123 | (is (match? |
124 | 124 | {:chat-content-received |
|
164 | 164 | req-id-2 (:req-id res-2)] |
165 | 165 | (is (match? |
166 | 166 | {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"}]}]}} |
171 | 171 | (:chats (h/db)))) |
172 | 172 | (is (match? |
173 | 173 | {:chat-content-received |
@@ -223,14 +223,14 @@ for allowed directories and then list files" |
223 | 223 | :contents [{:type :text :content "Allowed directories: /foo/bar"}]})})] |
224 | 224 | (is (match? |
225 | 225 | {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"}]} |
228 | 228 | {:role "tool_call" :content {:id "call-1" :name "list_allowed_directories" :arguments {}}} |
229 | 229 | {:role "tool_call_output" :content {:id "call-1" :name "list_allowed_directories" :arguments {} |
230 | 230 | :output {:error false |
231 | 231 | :contents [{:content "Allowed directories: /foo/bar" |
232 | 232 | :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"}]}]}} |
234 | 234 | (:chats (h/db)))) |
235 | 235 | (is (match? |
236 | 236 | {:chat-content-received |
|
0 commit comments