R Under development (unstable) (2024-01-17 r85813 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additional test configuration? > # Learn more about the roles of various files in: > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview > # * https://testthat.r-lib.org/articles/special-files.html > > library(testthat) > library(openaistream) Loading required package: jsonlite Loading required package: httr2 Attaching package: 'httr2' The following objects are masked from 'package:testthat': local_mock, with_mock Loading required package: R6 Loading required package: iterators Loading required package: curl Using libcurl 8.3.0 with Schannel > > test_check("openaistream") * WARNING: failed to open cookie file "" * Found bundle for host: 0x1e7f7cfd9b0 [serially] * Can not multiplex, even if we wanted to * Re-using existing connection with host api.openai.com -> POST /v1/embeddings HTTP/1.1 -> Host: api.openai.com -> User-Agent: httr2/1.0.0 r-curl/5.2.0 libcurl/8.3.0 -> Accept: */* -> Accept-Encoding: deflate, gzip -> Authorization: Bearer -> Content-Type: application/json -> Content-Length: 57 -> >> {"model":"text-embedding-ada-002","input":"who are you?"} <- HTTP/1.1 401 Unauthorized <- Date: Thu, 18 Jan 2024 04:24:41 GMT <- Content-Type: application/json; charset=utf-8 <- Content-Length: 496 <- Connection: keep-alive <- vary: Origin <- x-request-id: 13cb44943a792a0de2a57bcae7ed53df <- strict-transport-security: max-age=15724800; includeSubDomains <- CF-Cache-Status: DYNAMIC * Added cookie __cf_bm="tJlSS9dmLtlygAdzMg1snk3XAU9oX_s_SNkF0AkvKoY-1705551881-1-AcG86P7ogZfv48nRCCptD3JM463sugqmxSlA2uNnkrMAgJ9dV67KoxO8OiQrsBnX8XZjkXsWoiBT1wyWXy/Zf4I=" for domain api.openai.com, path /, expire 1705553681 <- Set-Cookie: __cf_bm=tJlSS9dmLtlygAdzMg1snk3XAU9oX_s_SNkF0AkvKoY-1705551881-1-AcG86P7ogZfv48nRCCptD3JM463sugqmxSlA2uNnkrMAgJ9dV67KoxO8OiQrsBnX8XZjkXsWoiBT1wyWXy/Zf4I=; path=/; expires=Thu, 18-Jan-24 04:54:41 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None * Added cookie _cfuvid="ZklAMK.RXHOqSugM0R7Ianv7OjV9EerUxlCWPnsdWJ8-1705551881915-0-604800000" for domain api.openai.com, path /, expire 0 <- Set-Cookie: _cfuvid=ZklAMK.RXHOqSugM0R7Ianv7OjV9EerUxlCWPnsdWJ8-1705551881915-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None <- Server: cloudflare <- CF-RAY: 847411dd18bb2c22-FRA <- alt-svc: h3=":443"; ma=86400 <- << { << "error": { << "message": "You didn't provide an API key. You need to provide your API key in an Authorization header using Bearer auth (i.e. Authorization: Bearer YOUR_KEY), or as the password field (with blank username) if you're accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.", << "type": "invalid_request_error", << "param": null, << "code": null << } << } * Connection #0 to host api.openai.com left intact * WARNING: failed to open cookie file "" * Found bundle for host: 0x1e7f7cfd9b0 [serially] * Can not multiplex, even if we wanted to * Re-using existing connection with host api.openai.com -> POST /v1/threads//messages HTTP/1.1 -> Host: api.openai.com -> User-Agent: httr2/1.0.0 r-curl/5.2.0 libcurl/8.3.0 -> Accept: */* -> Accept-Encoding: deflate, gzip -> Authorization: Bearer -> OpenAI-Beta: assistants=v1 -> Content-Type: application/json -> Content-Length: 51 -> >> {"file_ids":[null],"role":"user","content":"hello"} <- HTTP/1.1 401 Unauthorized <- Date: Thu, 18 Jan 2024 04:24:44 GMT <- Content-Type: application/json <- Content-Length: 231 <- Connection: keep-alive <- www-authenticate: Basic realm="OpenAI API" <- openai-version: 2020-10-01 <- x-request-id: 183b04a0bac5ed68c46691160625527b <- openai-processing-ms: 11 <- strict-transport-security: max-age=15724800; includeSubDomains <- CF-Cache-Status: DYNAMIC * Added cookie __cf_bm="DtoJpZrCaEqVj7LEkygpZdiUrQ2RIR6GZzhkX9oyzmE-1705551884-1-AUY8LZzl6ec7fthrDheezhVfyrr9Kr+qEoCZsZ5HJPfQhh7LwYCfZBW7ruKDwkZep9hBCyvWTbYW1WF+4XG7zQ8=" for domain api.openai.com, path /, expire 1705553684 <- Set-Cookie: __cf_bm=DtoJpZrCaEqVj7LEkygpZdiUrQ2RIR6GZzhkX9oyzmE-1705551884-1-AUY8LZzl6ec7fthrDheezhVfyrr9Kr+qEoCZsZ5HJPfQhh7LwYCfZBW7ruKDwkZep9hBCyvWTbYW1WF+4XG7zQ8=; path=/; expires=Thu, 18-Jan-24 04:54:44 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None * Added cookie _cfuvid="Nv.lPaInJv7uk7QdlVUZd8kH6tuK6kVWYg0iP6CfPtA-1705551884530-0-604800000" for domain api.openai.com, path /, expire 0 <- Set-Cookie: _cfuvid=Nv.lPaInJv7uk7QdlVUZd8kH6tuK6kVWYg0iP6CfPtA-1705551884530-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None <- Server: cloudflare <- CF-RAY: 847411ed5b032c22-FRA <- alt-svc: h3=":443"; ma=86400 <- << { << "error": { << "message": "Incorrect API key provided: ''. You can find your API key at https://platform.openai.com/account/api-keys.", << "type": "invalid_request_error", << "param": null, << "code": "invalid_api_key" << } << } * Connection #0 to host api.openai.com left intact * WARNING: failed to open cookie file "" * Found bundle for host: 0x1e7f7cfd9b0 [serially] * Can not multiplex, even if we wanted to * Re-using existing connection with host api.openai.com -> GET /v1/threads//messages HTTP/1.1 -> Host: api.openai.com -> User-Agent: httr2/1.0.0 r-curl/5.2.0 libcurl/8.3.0 -> Accept: */* -> Accept-Encoding: deflate, gzip -> Authorization: Bearer -> Content-Type: application/json -> OpenAI-Beta: assistants=v1 -> <- HTTP/1.1 401 Unauthorized <- Date: Thu, 18 Jan 2024 04:24:44 GMT <- Content-Type: application/json <- Content-Length: 231 <- Connection: keep-alive <- www-authenticate: Basic realm="OpenAI API" <- openai-version: 2020-10-01 <- x-request-id: b09439faa959e0baf9eb03cd083e1a3d <- openai-processing-ms: 11 <- strict-transport-security: max-age=15724800; includeSubDomains <- CF-Cache-Status: DYNAMIC * Added cookie __cf_bm="Gxh8GWu7MTkB5uJN7aP6BdYAWF8yFOuf4AFuZ4URrOQ-1705551884-1-Aedw4qSfHY7ppIAhNG2bQVkKshHxzo3UXYyHPzZ9f8WshQgqOT7oLdfAil9PDBQnpzyPKvhx6yFobfkOsesTckQ=" for domain api.openai.com, path /, expire 1705553684 <- Set-Cookie: __cf_bm=Gxh8GWu7MTkB5uJN7aP6BdYAWF8yFOuf4AFuZ4URrOQ-1705551884-1-Aedw4qSfHY7ppIAhNG2bQVkKshHxzo3UXYyHPzZ9f8WshQgqOT7oLdfAil9PDBQnpzyPKvhx6yFobfkOsesTckQ=; path=/; expires=Thu, 18-Jan-24 04:54:44 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None * Added cookie _cfuvid="f.NuTTGNSy6bHU89qQOZlRGmxCXpx4S7ai1b55pJrcM-1705551884739-0-604800000" for domain api.openai.com, path /, expire 0 <- Set-Cookie: _cfuvid=f.NuTTGNSy6bHU89qQOZlRGmxCXpx4S7ai1b55pJrcM-1705551884739-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None <- Server: cloudflare <- CF-RAY: 847411eebbb82c22-FRA <- alt-svc: h3=":443"; ma=86400 <- << { << "error": { << "message": "Incorrect API key provided: ''. You can find your API key at https://platform.openai.com/account/api-keys.", << "type": "invalid_request_error", << "param": null, << "code": "invalid_api_key" << } << } * Connection #0 to host api.openai.com left intact [1] "\n1 retry " * WARNING: failed to open cookie file "" * Found bundle for host: 0x1e7f98ff710 [serially] * Can not multiplex, even if we wanted to * Re-using existing connection with host api.openai.com -> POST /v1/threads HTTP/1.1 -> Host: api.openai.com -> User-Agent: httr2/1.0.0 r-curl/5.2.0 libcurl/8.3.0 -> Accept: */* -> Accept-Encoding: deflate, gzip -> Authorization: Bearer -> OpenAI-Beta: assistants=v1 -> Content-Type: application/json -> Content-Length: 2 -> >> [] <- HTTP/1.1 401 Unauthorized <- Date: Thu, 18 Jan 2024 04:28:33 GMT <- Content-Type: application/json <- Content-Length: 231 <- Connection: keep-alive <- www-authenticate: Basic realm="OpenAI API" <- openai-version: 2020-10-01 <- x-request-id: 4db91c6ac42d9c3a976ee6452efb482e <- openai-processing-ms: 9 <- strict-transport-security: max-age=15724800; includeSubDomains <- CF-Cache-Status: DYNAMIC * Added cookie __cf_bm="3ZbwWVYvoBbehyRszg06_.ivuWZPJGwDTZimO7_x_mY-1705552113-1-AZ8QggkQRH4d/DyF7GuoRLiAyldwaQyekCoeGk/LyqeLi/Y1Ay9GRkS00IROadfgD+s71Nx63OBr738IcImurdg=" for domain api.openai.com, path /, expire 1705553913 <- Set-Cookie: __cf_bm=3ZbwWVYvoBbehyRszg06_.ivuWZPJGwDTZimO7_x_mY-1705552113-1-AZ8QggkQRH4d/DyF7GuoRLiAyldwaQyekCoeGk/LyqeLi/Y1Ay9GRkS00IROadfgD+s71Nx63OBr738IcImurdg=; path=/; expires=Thu, 18-Jan-24 04:58:33 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None * Added cookie _cfuvid="BtJ8VJ1wQ3KQaFoRw4ifmBSPF4cvLd9pelQJnfXcIjs-1705552113857-0-604800000" for domain api.openai.com, path /, expire 0 <- Set-Cookie: _cfuvid=BtJ8VJ1wQ3KQaFoRw4ifmBSPF4cvLd9pelQJnfXcIjs-1705552113857-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None <- Server: cloudflare <- CF-RAY: 84741786bd97cae1-DUS <- alt-svc: h3=":443"; ma=86400 <- << { << "error": { << "message": "Incorrect API key provided: ''. You can find your API key at https://platform.openai.com/account/api-keys.", << "type": "invalid_request_error", << "param": null, << "code": "invalid_api_key" << } << } * Connection #1 to host api.openai.com left intact * WARNING: failed to open cookie file "" * Found bundle for host: 0x1e7f98ff710 [serially] * Can not multiplex, even if we wanted to * Re-using existing connection with host api.openai.com -> POST /v1/assistants HTTP/1.1 -> Host: api.openai.com -> User-Agent: httr2/1.0.0 r-curl/5.2.0 libcurl/8.3.0 -> Accept: */* -> Accept-Encoding: deflate, gzip -> Authorization: Bearer -> OpenAI-Beta: assistants=v1 -> Content-Type: application/json -> Content-Length: 1468 -> >> 1468 bytes of binary data <- HTTP/1.1 401 Unauthorized <- Date: Thu, 18 Jan 2024 04:28:34 GMT <- Content-Type: application/json <- Content-Length: 231 <- Connection: keep-alive <- www-authenticate: Basic realm="OpenAI API" <- openai-version: 2020-10-01 <- x-request-id: e0932b1ec553d7b881df1d276a1c1071 <- openai-processing-ms: 11 <- strict-transport-security: max-age=15724800; includeSubDomains <- CF-Cache-Status: DYNAMIC * Added cookie __cf_bm="D7g1mLKhKtm8v4Fzjy3n_zbdEE1j5BVeJf0XIeEVzII-1705552114-1-AXx3GTrZvHHIs2liYv5NShRT4EONjUanGG4TtSsBj8Pj3jgXMTsc/bKVrqJbl7JdRMmaMFxi4hUaXpb2NcerJpg=" for domain api.openai.com, path /, expire 1705553914 <- Set-Cookie: __cf_bm=D7g1mLKhKtm8v4Fzjy3n_zbdEE1j5BVeJf0XIeEVzII-1705552114-1-AXx3GTrZvHHIs2liYv5NShRT4EONjUanGG4TtSsBj8Pj3jgXMTsc/bKVrqJbl7JdRMmaMFxi4hUaXpb2NcerJpg=; path=/; expires=Thu, 18-Jan-24 04:58:34 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None * Added cookie _cfuvid="IPLfkSDxZrp8iZqCl7RozYzuj2odkeCIQiW9baq1mDM-1705552114265-0-604800000" for domain api.openai.com, path /, expire 0 <- Set-Cookie: _cfuvid=IPLfkSDxZrp8iZqCl7RozYzuj2odkeCIQiW9baq1mDM-1705552114265-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None <- Server: cloudflare <- CF-RAY: 847417893f28cae1-DUS <- alt-svc: h3=":443"; ma=86400 <- << { << "error": { << "message": "Incorrect API key provided: ''. You can find your API key at https://platform.openai.com/account/api-keys.", << "type": "invalid_request_error", << "param": null, << "code": "invalid_api_key" << } << } * Connection #1 to host api.openai.com left intact * WARNING: failed to open cookie file "" * Found bundle for host: 0x1e7f98ff710 [serially] * Can not multiplex, even if we wanted to * Re-using existing connection with host api.openai.com -> POST /v1/assistants HTTP/1.1 -> Host: api.openai.com -> User-Agent: httr2/1.0.0 r-curl/5.2.0 libcurl/8.3.0 -> Accept: */* -> Accept-Encoding: deflate, gzip -> Authorization: Bearer -> OpenAI-Beta: assistants=v1 -> Content-Type: application/json -> Content-Length: 704 -> >> {"name":"cor_flag2","instructions":"You are a weather bot. Use the provided functions to answer questions.","tools":[{"type":"function","function":{"name":"getCurrentWeather","description":"Get the weather in location","parameters":{"type":"object","properties":{"location":{"type":"string","description":"The city and state e.g. San Francisco, CA"},"unit":{"type":"string","enum":["c","f"]}},"required":["location"]}}},{"type":"function","function":{"name":"getNickname","description":"Get the nickname of a city","parameters":{"type":"object","properties":{"location":{"type":"string","description":"The city and state e.g. San Francisco, CA"}},"required":["location"]}}}],"model":"gpt-4-1106-preview"} <- HTTP/1.1 401 Unauthorized <- Date: Thu, 18 Jan 2024 04:28:34 GMT <- Content-Type: application/json <- Content-Length: 231 <- Connection: keep-alive <- www-authenticate: Basic realm="OpenAI API" <- openai-version: 2020-10-01 <- x-request-id: fb973a7bb1eb0f787fab7e81e36f4c7d <- openai-processing-ms: 1 <- strict-transport-security: max-age=15724800; includeSubDomains <- CF-Cache-Status: DYNAMIC * Added cookie __cf_bm="1zyIhZzqVKDoIeWLwXjNzT8F6Z2aGptK6tWqXjo3Kbk-1705552114-1-AfbbY19LxrIYZ77E2btiZn0JFsPfc55Z7FSlg2P8Vs55I8BqWVfjj1UZ8Ijoe4DWs5s2dgAk+waNZjOzwNVpcdA=" for domain api.openai.com, path /, expire 1705553914 <- Set-Cookie: __cf_bm=1zyIhZzqVKDoIeWLwXjNzT8F6Z2aGptK6tWqXjo3Kbk-1705552114-1-AfbbY19LxrIYZ77E2btiZn0JFsPfc55Z7FSlg2P8Vs55I8BqWVfjj1UZ8Ijoe4DWs5s2dgAk+waNZjOzwNVpcdA=; path=/; expires=Thu, 18-Jan-24 04:58:34 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None * Added cookie _cfuvid="IlkNXgHL9G0TjaTvtK84koQbYTatql5FnFoe3yjFZp0-1705552114466-0-604800000" for domain api.openai.com, path /, expire 0 <- Set-Cookie: _cfuvid=IlkNXgHL9G0TjaTvtK84koQbYTatql5FnFoe3yjFZp0-1705552114466-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None <- Server: cloudflare <- CF-RAY: 8474178a7875cae1-DUS <- alt-svc: h3=":443"; ma=86400 <- << { << "error": { << "message": "Incorrect API key provided: ''. You can find your API key at https://platform.openai.com/account/api-keys.", << "type": "invalid_request_error", << "param": null, << "code": "invalid_api_key" << } << } * Connection #1 to host api.openai.com left intact * WARNING: failed to open cookie file "" * Found bundle for host: 0x1e7f98ff710 [serially] * Can not multiplex, even if we wanted to * Re-using existing connection with host api.openai.com -> POST /v1/threads/runs HTTP/1.1 -> Host: api.openai.com -> User-Agent: httr2/1.0.0 r-curl/5.2.0 libcurl/8.3.0 -> Accept: */* -> Accept-Encoding: deflate, gzip -> Authorization: Bearer -> OpenAI-Beta: assistants=v1 -> Content-Type: application/json -> Content-Length: 91 -> >> {"thread":{"messages":[{"role":"user","content":"What foods are good for heart health?"}]}} <- HTTP/1.1 401 Unauthorized <- Date: Thu, 18 Jan 2024 04:28:34 GMT <- Content-Type: application/json <- Content-Length: 231 <- Connection: keep-alive <- www-authenticate: Basic realm="OpenAI API" <- openai-version: 2020-10-01 <- x-request-id: eddcdda59cb228a1356499cc1ea99ec6 <- openai-processing-ms: 9 <- strict-transport-security: max-age=15724800; includeSubDomains <- CF-Cache-Status: DYNAMIC * Added cookie __cf_bm="ntOXX5Ave5CHeziT7EidQ_f5IgwTZs9M3o_6MayFgOo-1705552114-1-ATsU29NEg92VqFLw7fdeQhrCvbheWtjHzNb5kGZBmqXnJvFkQ7CdwlAJhR67hi/ZwiREiIfWpk5xhDQhoQxxUs8=" for domain api.openai.com, path /, expire 1705553914 <- Set-Cookie: __cf_bm=ntOXX5Ave5CHeziT7EidQ_f5IgwTZs9M3o_6MayFgOo-1705552114-1-ATsU29NEg92VqFLw7fdeQhrCvbheWtjHzNb5kGZBmqXnJvFkQ7CdwlAJhR67hi/ZwiREiIfWpk5xhDQhoQxxUs8=; path=/; expires=Thu, 18-Jan-24 04:58:34 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None * Added cookie _cfuvid="vkDRiVKfiA2EfttlT.vvBqfpO.7r_UF0lTs5VZcAlTU-1705552114670-0-604800000" for domain api.openai.com, path /, expire 0 <- Set-Cookie: _cfuvid=vkDRiVKfiA2EfttlT.vvBqfpO.7r_UF0lTs5VZcAlTU-1705552114670-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None <- Server: cloudflare <- CF-RAY: 8474178bc974cae1-DUS <- alt-svc: h3=":443"; ma=86400 <- << { << "error": { << "message": "Incorrect API key provided: ''. You can find your API key at https://platform.openai.com/account/api-keys.", << "type": "invalid_request_error", << "param": null, << "code": "invalid_api_key" << } << } * Connection #1 to host api.openai.com left intact [ FAIL 30 | WARN 0 | SKIP 0 | PASS 33 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Failure ('test_assistants.R:19:3'): assistants ────────────────────────────── ass$name (`actual`) not equal to "cor_flag" (`expected`). `actual` is NULL `expected` is a character vector ('cor_flag') ── Failure ('test_assistants.R:21:3'): assistants ────────────────────────────── assr$name (`actual`) not equal to "cor_flag" (`expected`). `actual` is NULL `expected` is a character vector ('cor_flag') ── Failure ('test_assistants.R:23:3'): assistants ────────────────────────────── assm$model (`actual`) not equal to "gpt-4-1106-preview" (`expected`). `actual` is NULL `expected` is a character vector ('gpt-4-1106-preview') ── Error ('test_assistants.R:25:3'): assistants ──────────────────────────────── Error in `expect_contains(assl$data$name, "cor_flag")`: `object` and `expected` must both be vectors Backtrace: ▆ 1. └─testthat::expect_contains(assl$data$name, "cor_flag") at test_assistants.R:25:3 2. └─rlang::abort("`object` and `expected` must both be vectors") ── Failure ('test_chat.R:15:3'): chat ────────────────────────────────────────── nrow(streamlg$vres) (`actual`) not equal to 3 (`expected`). `actual` is NULL `expected` is a double vector (3) ── Failure ('test_chat.R:37:3'): chat ────────────────────────────────────────── length(text$all_resp) (`actual`) not equal to 2 (`expected`). `actual`: 0 `expected`: 2 ── Failure ('test_chat.R:39:3'): chat ────────────────────────────────────────── length(text$all_resp) (`actual`) not equal to 2 (`expected`). `actual`: 0 `expected`: 2 ── Failure ('test_chat.R:105:3'): chat ───────────────────────────────────────── text$message (`actual`) not equal to "parse error: trailing garbage\n \"message\": \"'sdasd' is not of type 'inte\n (right here) ------^\n" (`expected`). lines(actual) vs lines(expected) "parse error: trailing garbage" - " \"message\": \"You didn't provide an API ke" + " \"message\": \"'sdasd' is not of type 'inte" " (right here) ------^" "" ── Failure ('test_embedding.R:9:3'): embedding ───────────────────────────────── embed$data$embedding[[1]] has type 'NULL', not 'double'. ── Failure ('test_files.R:9:3'): test files ──────────────────────────────────── file_id$filename (`actual`) not equal to "train.jsonl" (`expected`). `actual` is NULL `expected` is a character vector ('train.jsonl') ── Failure ('test_files.R:15:3'): test files ─────────────────────────────────── file_list$success is not NULL `actual` is a logical vector (FALSE) `expected` is NULL ── Error ('test_files.R:22:3'): test files ───────────────────────────────────── Error: lexical error: invalid char in json text. [FALSE] [Error in `req_perform() (right here) ------^ Backtrace: ▆ 1. └─jsonlite::fromJSON(...) at test_files.R:22:3 2. └─jsonlite:::parse_and_simplify(...) 3. └─jsonlite:::parseJSON(txt, bigint_as_char) 4. └─jsonlite:::parse_string(txt, bigint_as_char) ── Error ('test_fine_tuning.R:18:3'): test fileload and fine train ───────────── Error in `expect_contains(names(job_events$data), "data")`: `object` and `expected` must both be vectors Backtrace: ▆ 1. └─testthat::expect_contains(names(job_events$data), "data") at test_fine_tuning.R:18:3 2. └─rlang::abort("`object` and `expected` must both be vectors") ── Failure ('test_images.R:10:3'): images ────────────────────────────────────── names(pic1) (`actual`) doesn't fully contain all the values in "data" (`expected`). * Missing from `actual`: "data" * Present in `actual`: "success", "message", "type" ── Error ('test_images.R:12:3'): images ──────────────────────────────────────── Error in `request(pic1$data$url)`: `url` must be a single string, not `NULL`. Backtrace: ▆ 1. ├─request(pic1$data$url) %>% req_perform(path = pic_file1) at test_images.R:12:3 2. ├─httr2::req_perform(., path = pic_file1) 3. │ └─httr2:::check_request(req) 4. │ └─httr2:::is_request(req) 5. └─httr2::request(base_url = pic1$data$url) 6. └─httr2:::new_request(base_url) 7. └─httr2:::check_string(url, call = error_call) 8. └─httr2:::stop_input_type(...) 9. └─rlang::abort(message, ..., call = call, arg = arg) ── Failure ('test_messages.R:8:3'): messages ─────────────────────────────────── names(thc) (`actual`) doesn't fully contain all the values in "id" (`expected`). * Missing from `actual`: "id" * Present in `actual`: "success", "message", "type" ── Failure ('test_messages.R:13:3'): messages ────────────────────────────────── mesc$object (`actual`) not equal to "thread.message" (`expected`). `actual` is NULL `expected` is a character vector ('thread.message') ── Error ('test_messages.R:15:3'): messages ──────────────────────────────────── Error in `expect_contains(mesl$data$id, mesc$id)`: `object` and `expected` must both be vectors Backtrace: ▆ 1. └─testthat::expect_contains(mesl$data$id, mesc$id) at test_messages.R:15:3 2. └─rlang::abort("`object` and `expected` must both be vectors") ── Error ('test_models.R:19:5'): long time test ──────────────────────────────── Error in `if (job_retrieve$status == "succeeded") { res <- handle_openai$models$delete(job_retrieve$fine_tuned_model) expect_true(res$deleted) break }`: argument is of length zero ── Failure ('test_moderations.R:9:3'): moderations ───────────────────────────── modc$results$categories$violence is not TRUE `actual` is NULL `expected` is a logical vector (TRUE) ── Failure ('test_run.R:8:3'): run ───────────────────────────────────────────── names(thc) (`actual`) doesn't fully contain all the values in "id" (`expected`). * Missing from `actual`: "id" * Present in `actual`: "success", "message", "type" ── Failure ('test_run.R:51:3'): run ──────────────────────────────────────────── ass$model (`actual`) not equal to "gpt-4-1106-preview" (`expected`). `actual` is NULL `expected` is a character vector ('gpt-4-1106-preview') ── Failure ('test_run.R:53:3'): run ──────────────────────────────────────────── runct$object (`actual`) not equal to "thread.run" (`expected`). `actual` is NULL `expected` is a character vector ('thread.run') ── Error ('test_run.R:55:3'): run ────────────────────────────────────────────── Error in `expect_contains(runl$data$thread_id, runct$thread_id)`: `object` and `expected` must both be vectors Backtrace: ▆ 1. └─testthat::expect_contains(runl$data$thread_id, runct$thread_id) at test_run.R:55:3 2. └─rlang::abort("`object` and `expected` must both be vectors") ── Failure ('test_speech.R:10:3'): speech ────────────────────────────────────── `sss` has type 'list', not 'raw'. ── Error ('test_speech.R:12:3'): speech ──────────────────────────────────────── Error in `writeBin(sss, test_file1)`: can only write vector objects Backtrace: ▆ 1. ├─testthat::expect_silent(writeBin(sss, test_file1)) at test_speech.R:12:3 2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise) 3. │ ├─testthat (local) .capture(...) 4. │ │ ├─withr::with_output_sink(...) 5. │ │ │ └─base::force(code) 6. │ │ ├─base::withCallingHandlers(...) 7. │ │ └─base::withVisible(code) 8. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 9. └─base::writeBin(sss, test_file1) ── Failure ('test_thread.R:8:3'): thread ─────────────────────────────────────── names(thc) (`actual`) doesn't fully contain all the values in "id" (`expected`). * Missing from `actual`: "id" * Present in `actual`: "success", "message", "type" ── Failure ('test_thread.R:10:3'): thread ────────────────────────────────────── names(thr) (`actual`) doesn't fully contain all the values in "id" (`expected`). * Missing from `actual`: "id" * Present in `actual`: "success", "message", "type" ── Failure ('test_thread.R:12:3'): thread ────────────────────────────────────── thm$metadata$test (`actual`) not equal to "test" (`expected`). `actual` is NULL `expected` is a character vector ('test') ── Failure ('test_thread.R:14:3'): thread ────────────────────────────────────── thd$deleted is not TRUE `actual` is NULL `expected` is a logical vector (TRUE) [ FAIL 30 | WARN 0 | SKIP 0 | PASS 33 ] Error: Test failures In addition: Warning messages: 1: In .Internal(gc(verbose, reset, full)) : closing unused connection 9 (https://api.openai.com/v1/chat/completions) 2: In .Internal(gc(verbose, reset, full)) : closing unused connection 5 (https://api.openai.com/v1/chat/completions) 3: In .Internal(gc(verbose, reset, full)) : closing unused connection 4 (https://api.openai.com/v1/chat/completions) Execution halted