Skip to content

update vercel ai code #392

update vercel ai code

update vercel ai code #392

Triggered via pull request December 6, 2024 12:58
Status Failure
Total duration 45s
Artifacts

main.yml

on: pull_request
runs typescript and tests
35s
runs typescript and tests
Publish to NPM
0s
Publish to NPM
Fit to window
Zoom out
Zoom in

Annotations

10 errors and 2 warnings
src/LangtailPrompts.spec.ts > LangtailPrompts > invoke > should not record: src/LangtailPrompts.spec.ts#L133
AssertionError: expected '1' to be 1 // Object.is equality - Expected: 1 + Received: "1" ❯ Object.fetch src/LangtailPrompts.spec.ts:133:73 ❯ LangtailPrompts.invoke src/LangtailPrompts.ts:142:32 ❯ src/LangtailPrompts.spec.ts:152:41
src/react/useChatStream.test.ts > useAIStream > public API > return values > messages > should add another message to the initial one: src/react/useChatStream.test.ts#L372
AssertionError: expected [ { role: 'user', …(1) }, …(1) ] to deeply equal [ { role: 'user', …(1) }, …(1) ] - Expected + Received Array [ Object { "content": "user input", "role": "user", }, Object { "content": "hello.", + "parsed": null, + "refusal": null, "role": "assistant", + "tool_calls": Array [], }, ] ❯ src/react/useChatStream.test.ts:372:45
src/react/useChatStream.test.ts > useAIStream > public API > return values > messages > should complete 2 messages: src/react/useChatStream.test.ts#L423
AssertionError: expected [ { role: 'user', …(1) }, …(2) ] to deeply equal [ { role: 'user', …(1) }, …(2) ] - Expected + Received Array [ Object { "content": "user input", "role": "user", }, Object { "content": "hello!", "role": "assistant", }, Object { "content": " And this is my end.", + "parsed": null, + "refusal": null, "role": "assistant", + "tool_calls": Array [], }, ] ❯ src/react/useChatStream.test.ts:423:45
src/react/useChatStream.test.ts > useAIStream > public API > return values > messages > should return message with a tool call: src/react/useChatStream.test.ts#L469
AssertionError: expected [ { role: 'user', …(1) }, …(1) ] to deeply equal [ { role: 'user', …(1) }, { …(3) } ] - Expected + Received Array [ Object { "content": "user input", "role": "user", }, Object { "content": "Understood, I will get the current weather for Prague, Czech Republic.", + "parsed": null, + "refusal": null, "role": "assistant", "tool_calls": Array [ Object { "function": Object { "arguments": "{\"location\":\"Prague, Czech Republic\"}", "name": "get_weather", }, "id": "call_tNW2f79DhRvuuwrslSYt3yVT", "type": "function", }, ], }, ] ❯ src/react/useChatStream.test.ts:469:45
src/react/useChatStream.test.ts > useAIStream > public API > too calls > should trigger a tool call: src/react/useChatStream.test.ts#L537
AssertionError: expected "spy" to be called with arguments: [ { function: { …(2) }, …(2) }, …(1) ] Received: 1st spy call: Array [ Object { "function": Object { "arguments": "{\"location\":\"Prague, Czech Republic\"}", "name": "get_weather", }, "id": "call_tNW2f79DhRvuuwrslSYt3yVT", "type": "function", }, Object { "content": "Understood, I will get the current weather for Prague, Czech Republic.", + "parsed": null, + "refusal": null, "role": "assistant", "tool_calls": Array [ Object { "function": Object { "arguments": "{\"location\":\"Prague, Czech Republic\"}", "name": "get_weather", }, "id": "call_tNW2f79DhRvuuwrslSYt3yVT", "type": "function", }, ], }, ] Number of calls: 1 ❯ src/react/useChatStream.test.ts:537:30
src/react/useChatStream.test.ts > useAIStream > public API > too calls > should ensure that the content isn't nullish: src/react/useChatStream.test.ts#L614
AssertionError: expected [ { role: 'user', …(1) }, …(2) ] to deeply equal [ { role: 'user', …(1) }, …(2) ] - Expected + Received Array [ Object { "content": "user input", "role": "user", }, Object { "content": "", + "parsed": null, + "refusal": null, "role": "assistant", "tool_calls": Array [ Object { "function": Object { "arguments": "{\"location\":\"Prague, Czech Republic\"}", "name": "get_weather", }, "id": "call_tNW2f79DhRvuuwrslSYt3yVT", "type": "function", }, ], }, Object { "content": "Result in test", "role": "tool", "tool_call_id": "call_tNW2f79DhRvuuwrslSYt3yVT", }, ] ❯ src/react/useChatStream.test.ts:614:43
src/react/useChatStream.test.ts > useAIStream > public API > too calls > should pass tool call result to the messages: src/react/useChatStream.test.ts#L687
AssertionError: expected [ { role: 'user', …(1) }, …(2) ] to deeply equal [ { role: 'user', …(1) }, …(2) ] - Expected + Received Array [ Object { "content": "user input", "role": "user", }, Object { "content": "Understood, I will get the current weather for Prague, Czech Republic.", + "parsed": null, + "refusal": null, "role": "assistant", "tool_calls": Array [ Object { "function": Object { "arguments": "{\"location\":\"Prague, Czech Republic\"}", "name": "get_weather", }, "id": "call_tNW2f79DhRvuuwrslSYt3yVT", "type": "function", }, ], }, Object { "content": "Result in test", "role": "tool", "tool_call_id": "call_tNW2f79DhRvuuwrslSYt3yVT", }, ] ❯ src/react/useChatStream.test.ts:687:43
src/react/useChatStream.test.ts > useAIStream > public API > too calls > should assemble streamed message ending with a tool call in the complete messages: src/react/useChatStream.test.ts#L763
AssertionError: expected [ { role: 'user', …(1) }, …(1) ] to deeply equal [ { role: 'user', …(1) }, { …(4) } ] - Expected + Received Array [ Object { "content": "user input", "role": "user", }, Object { "content": "Sure! I'll generate a joke for you.", + "parsed": null, "refusal": null, "role": "assistant", "tool_calls": Array [ Object { "function": Object { "arguments": "{\"theme\":\"Dad\"}", "name": "generate_theme_joke", }, "id": "call_SdFeFRJQTfJvZynvs6KgrN6t", "type": "function", }, ], }, ] ❯ src/react/useChatStream.test.ts:763:43
src/react/useChatStream.test.ts > useAIStream > public API > too calls > should properly add tool calls to the streamed messages: src/react/useChatStream.test.ts#L860
AssertionError: expected [ { role: 'user', …(1) }, …(3) ] to deeply equal [ { role: 'user', …(1) }, …(3) ] - Expected + Received Array [ Object { "content": "user input", "role": "user", }, Object { "content": "Sure, let me generate a dad joke for you:", "refusal": null, "role": "assistant", "tool_calls": Array [ Object { "function": Object { "arguments": "{\"theme\": \"general\"}", "name": "generate_dad_jokes", }, "id": "toolu_01B1GTdvhAEB29KubfFpUbFm", "type": "function", }, ], }, Object { "content": "Someone messed up number of floors in the elevator. It was wrong on so many levels.", "role": "tool", "tool_call_id": "toolu_01B1GTdvhAEB29KubfFpUbFm", }, Object { "content": "There's a classic dad joke for you! Let me know if you'd like another one on a different theme.", + "parsed": null, + "refusal": null, "role": "assistant", + "tool_calls": Array [], }, ] ❯ src/react/useChatStream.test.ts:860:43
src/react/useChatStream.test.ts > useAIStream > public API > too calls > should request AI completion with tool call reults: src/react/useChatStream.test.ts#L928
AssertionError: expected [ { role: 'user', …(1) }, …(2) ] to deeply equal [ { role: 'user', …(1) }, …(2) ] - Expected + Received Array [ Object { "content": "user input", "role": "user", }, Object { "content": "Understood, I will get the current weather for Prague, Czech Republic.", + "parsed": null, + "refusal": null, "role": "assistant", "tool_calls": Array [ Object { "function": Object { "arguments": "{\"location\":\"Prague, Czech Republic\"}", "name": "get_weather", }, "id": "call_tNW2f79DhRvuuwrslSYt3yVT", "type": "function", }, ], }, Object { "content": "Tool result in test!", "role": "tool", "tool_call_id": "call_tNW2f79DhRvuuwrslSYt3yVT", }, ] ❯ src/react/useChatStream.test.ts:928:61
runs typescript and tests
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
runs typescript and tests
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/