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: 0x196847fee00 [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 17:45:44 GMT <- Content-Type: application/json; charset=utf-8 <- Content-Length: 496 <- Connection: keep-alive <- vary: Origin <- x-request-id: 8e5a5ab5e8914a2a5a18c24cf390f2c6 <- strict-transport-security: max-age=15724800; includeSubDomains <- CF-Cache-Status: DYNAMIC * Added cookie __cf_bm="fR8JEfC9VtlgbpLLjknw92tdWQV2OtnLzgZM1OV8KvE-1705599944-1-AaCS9mbxn2ftI6M9RhmGLzV0MpTf8QlM8CFggicDHfliIIS7w1lrJWypiS03ln2n2dOYbqDYlX/YkONlD1sbFYU=" for domain api.openai.com, path /, expire 1705601744 <- Set-Cookie: __cf_bm=fR8JEfC9VtlgbpLLjknw92tdWQV2OtnLzgZM1OV8KvE-1705599944-1-AaCS9mbxn2ftI6M9RhmGLzV0MpTf8QlM8CFggicDHfliIIS7w1lrJWypiS03ln2n2dOYbqDYlX/YkONlD1sbFYU=; path=/; expires=Thu, 18-Jan-24 18:15:44 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None * Added cookie _cfuvid="htFZcjh3nFQ7iUA3tlZxI.x2_I8VWRMiwyS9bfCcgYs-1705599944443-0-604800000" for domain api.openai.com, path /, expire 0 <- Set-Cookie: _cfuvid=htFZcjh3nFQ7iUA3tlZxI.x2_I8VWRMiwyS9bfCcgYs-1705599944443-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None <- Server: cloudflare <- CF-RAY: 8478a743cf0c6973-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: 0x196847fee00 [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 17:45:46 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: 8b9433e14a1fe2eb1e9a738286a274cc <- openai-processing-ms: 10 <- strict-transport-security: max-age=15724800; includeSubDomains <- CF-Cache-Status: DYNAMIC * Added cookie __cf_bm="fTT4JnCtDnGhZMWR6rkgAKjcNFwM_3jw.CyigSJGmwY-1705599946-1-AadeDMjtsBB9la8ZJcO+IpuYk+r3jR37KpRj4m5SRwTOVMw9E9GPzBTARzzt5lxkxfaevA8lkHh9Ta7ES8WHe9Q=" for domain api.openai.com, path /, expire 1705601746 <- Set-Cookie: __cf_bm=fTT4JnCtDnGhZMWR6rkgAKjcNFwM_3jw.CyigSJGmwY-1705599946-1-AadeDMjtsBB9la8ZJcO+IpuYk+r3jR37KpRj4m5SRwTOVMw9E9GPzBTARzzt5lxkxfaevA8lkHh9Ta7ES8WHe9Q=; path=/; expires=Thu, 18-Jan-24 18:15:46 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None * Added cookie _cfuvid="gCnfMw2eRB7iKjrXiYzpOtFweyPPYNoO1nkc3wHSYCE-1705599946705-0-604800000" for domain api.openai.com, path /, expire 0 <- Set-Cookie: _cfuvid=gCnfMw2eRB7iKjrXiYzpOtFweyPPYNoO1nkc3wHSYCE-1705599946705-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None <- Server: cloudflare <- CF-RAY: 8478a751ef406973-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: 0x196847fee00 [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 17:45:46 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: 46b6b24f06b28521c0a1d0a286e4bc77 <- openai-processing-ms: 9 <- strict-transport-security: max-age=15724800; includeSubDomains <- CF-Cache-Status: DYNAMIC * Added cookie __cf_bm="F.sekopsiPnrhecM4Y5F3mqdDV5jMWiQK3bAgOvLz.U-1705599946-1-ARAOodS9pdn3n5+TiuueQf/3UXGO/PpsREWMd8WoOywxkgQK1t5m5XW0zSJ8wd6NKLir/y0igH2YQo0XRAyVSdA=" for domain api.openai.com, path /, expire 1705601746 <- Set-Cookie: __cf_bm=F.sekopsiPnrhecM4Y5F3mqdDV5jMWiQK3bAgOvLz.U-1705599946-1-ARAOodS9pdn3n5+TiuueQf/3UXGO/PpsREWMd8WoOywxkgQK1t5m5XW0zSJ8wd6NKLir/y0igH2YQo0XRAyVSdA=; path=/; expires=Thu, 18-Jan-24 18:15:46 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None * Added cookie _cfuvid="aY5UFaEeVpLVd66gIUW78iEfLyNg9qVtzC9WYyRx8bI-1705599946948-0-604800000" for domain api.openai.com, path /, expire 0 <- Set-Cookie: _cfuvid=aY5UFaEeVpLVd66gIUW78iEfLyNg9qVtzC9WYyRx8bI-1705599946948-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None <- Server: cloudflare <- CF-RAY: 8478a75328636973-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: 0x19684cfb650 [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 17:49:36 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: 723542227cc6d0fb5b6d9d6b6e048977 <- openai-processing-ms: 9 <- strict-transport-security: max-age=15724800; includeSubDomains <- CF-Cache-Status: DYNAMIC * Added cookie __cf_bm="RTOQkDJwUcnSM2.QH2SBCPUxmm_c0UI_JvMSgOt0W.0-1705600176-1-AanpVkV3b1vc8Mx6uX+EwgwfuEGG/jWASs0Aku3ayi2pZxrgSJF+gqqD31QleWB19o1fGSjnzaxJI1OfZxChJto=" for domain api.openai.com, path /, expire 1705601976 <- Set-Cookie: __cf_bm=RTOQkDJwUcnSM2.QH2SBCPUxmm_c0UI_JvMSgOt0W.0-1705600176-1-AanpVkV3b1vc8Mx6uX+EwgwfuEGG/jWASs0Aku3ayi2pZxrgSJF+gqqD31QleWB19o1fGSjnzaxJI1OfZxChJto=; path=/; expires=Thu, 18-Jan-24 18:19:36 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None * Added cookie _cfuvid="gmgPCMauxHaPFJf0XCOqhgLc9mQ2SUKKoGWWnlehalo-1705600176149-0-604800000" for domain api.openai.com, path /, expire 0 <- Set-Cookie: _cfuvid=gmgPCMauxHaPFJf0XCOqhgLc9mQ2SUKKoGWWnlehalo-1705600176149-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None <- Server: cloudflare <- CF-RAY: 8478acebfead8751-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: 0x19684cfb650 [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 17:49:36 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: 2947c0495e26f92a89e2c454f4ac8ef4 <- openai-processing-ms: 9 <- strict-transport-security: max-age=15724800; includeSubDomains <- CF-Cache-Status: DYNAMIC * Added cookie __cf_bm="CHYuxjaiUCIJYi6gCcv999whaW5g_lFe9xWcxtkNE0o-1705600176-1-ATuEAQvB1OXnrDB61NAUrcBj4PAoPHXQCmsKXcF2GSF0L6jlAyzkwDHsQX7nr73ALW8Vf6JOCfQPXLdBYwk1r48=" for domain api.openai.com, path /, expire 1705601976 <- Set-Cookie: __cf_bm=CHYuxjaiUCIJYi6gCcv999whaW5g_lFe9xWcxtkNE0o-1705600176-1-ATuEAQvB1OXnrDB61NAUrcBj4PAoPHXQCmsKXcF2GSF0L6jlAyzkwDHsQX7nr73ALW8Vf6JOCfQPXLdBYwk1r48=; path=/; expires=Thu, 18-Jan-24 18:19:36 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None * Added cookie _cfuvid="ky81FGeQ4iibmHzLKrz22cSMZXlP48qql6fWBl.p428-1705600176571-0-604800000" for domain api.openai.com, path /, expire 0 <- Set-Cookie: _cfuvid=ky81FGeQ4iibmHzLKrz22cSMZXlP48qql6fWBl.p428-1705600176571-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None <- Server: cloudflare <- CF-RAY: 8478acee88ee8751-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: 0x19684cfb650 [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 17:49:36 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: 1a2df5d23bc8e21d6eab8a14947e2bf3 <- openai-processing-ms: 0 <- strict-transport-security: max-age=15724800; includeSubDomains <- CF-Cache-Status: DYNAMIC * Added cookie __cf_bm="EOmN98u.05_PjV64UfSvK.2VWPe_0_5HxdfxOgWq13k-1705600176-1-AfDHDXNVu2RsIye+umLR3q3bMhPXJ1CwGHNepd/jNJHzzgphrPiFTWdXEwZmaStQzBGCkLflnnxpwZ7hiNcnX5E=" for domain api.openai.com, path /, expire 1705601976 <- Set-Cookie: __cf_bm=EOmN98u.05_PjV64UfSvK.2VWPe_0_5HxdfxOgWq13k-1705600176-1-AfDHDXNVu2RsIye+umLR3q3bMhPXJ1CwGHNepd/jNJHzzgphrPiFTWdXEwZmaStQzBGCkLflnnxpwZ7hiNcnX5E=; path=/; expires=Thu, 18-Jan-24 18:19:36 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None * Added cookie _cfuvid="mJhUiio9kYuljFMF.tg6qnzdVkRLFhTMFetjUuqnke4-1705600176776-0-604800000" for domain api.openai.com, path /, expire 0 <- Set-Cookie: _cfuvid=mJhUiio9kYuljFMF.tg6qnzdVkRLFhTMFetjUuqnke4-1705600176776-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None <- Server: cloudflare <- CF-RAY: 8478acefd9c98751-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: 0x19684cfb650 [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 17:49:36 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: 13a09907d94ec5e802e15e47b61835f5 <- openai-processing-ms: 11 <- strict-transport-security: max-age=15724800; includeSubDomains <- CF-Cache-Status: DYNAMIC * Added cookie __cf_bm="apc.MhBTGCEEHHfhovODgcz2fMif_Qspebfhd69H8Hs-1705600176-1-AZnTqYiDResp4BXftoNbqOoJIZjv9xJn+NDZ8ykcV/fdSD8E+OKgf6ugxO5ZxrWtTMx0BwatIRkmINUrPtZZg7I=" for domain api.openai.com, path /, expire 1705601976 <- Set-Cookie: __cf_bm=apc.MhBTGCEEHHfhovODgcz2fMif_Qspebfhd69H8Hs-1705600176-1-AZnTqYiDResp4BXftoNbqOoJIZjv9xJn+NDZ8ykcV/fdSD8E+OKgf6ugxO5ZxrWtTMx0BwatIRkmINUrPtZZg7I=; path=/; expires=Thu, 18-Jan-24 18:19:36 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None * Added cookie _cfuvid="OIAApMxSfhXkjiWh_JG_Iqci85yHxZr_MgyLcf8EB8I-1705600176988-0-604800000" for domain api.openai.com, path /, expire 0 <- Set-Cookie: _cfuvid=OIAApMxSfhXkjiWh_JG_Iqci85yHxZr_MgyLcf8EB8I-1705600176988-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None <- Server: cloudflare <- CF-RAY: 8478acf12aa18751-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