* using log directory 'd:/RCompile/CRANincoming/R-devel/openaistream.Rcheck' * using R Under development (unstable) (2024-01-07 r85787 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 12.3.0 GNU Fortran (GCC) 12.3.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * checking for file 'openaistream/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'openaistream' version '0.2.0' * package encoding: UTF-8 * checking CRAN incoming feasibility ... NOTE Maintainer: 'Li Gen ' License components with restrictions and base license permitting such: MIT + file LICENSE File 'LICENSE': YEAR: 2023 COPYRIGHT HOLDER: openaistream authors MIT License Copyright (c) 2023 libingfei Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'openaistream' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking for future file timestamps ... OK * checking DESCRIPTION meta-information ... NOTE License stub is invalid DCF. * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking examples ... OK * checking for unstated dependencies in 'tests' ... OK * checking tests ... [239s] ERROR Running 'testthat.R' [238s] Running the tests in 'tests/testthat.R' failed. Complete output: > # 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: 0x1b51aefbd10 [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, 11 Jan 2024 03:30:53 GMT <- Content-Type: application/json; charset=utf-8 <- Content-Length: 496 <- Connection: keep-alive <- vary: Origin <- x-request-id: ca3210eb1d01058fd602f14732aedf3f <- strict-transport-security: max-age=15724800; includeSubDomains <- CF-Cache-Status: DYNAMIC * Added cookie __cf_bm="o5oG1koaROvocNFS4DOSS9EnMrInRODnoXNrnWXiBe8-1704943853-1-AdoX2AJU1USWBEuTEzvNEs7Fwic5baDfmvA8UW98aD2XoOCnBYE1YY5YI8+xiFuKe/VAEy8RTzwUzNy3ZSRGgcE=" for domain api.openai.com, path /, expire 1704945653 <- Set-Cookie: __cf_bm=o5oG1koaROvocNFS4DOSS9EnMrInRODnoXNrnWXiBe8-1704943853-1-AdoX2AJU1USWBEuTEzvNEs7Fwic5baDfmvA8UW98aD2XoOCnBYE1YY5YI8+xiFuKe/VAEy8RTzwUzNy3ZSRGgcE=; path=/; expires=Thu, 11-Jan-24 04:00:53 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None * Added cookie _cfuvid="z0GXDWehS3C6nG1ZGVPfYkedAAYXlnSutgnb.9DpI5g-1704943853337-0-604800000" for domain api.openai.com, path /, expire 0 <- Set-Cookie: _cfuvid=z0GXDWehS3C6nG1ZGVPfYkedAAYXlnSutgnb.9DpI5g-1704943853337-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None <- Server: cloudflare <- CF-RAY: 843a156a8f427180-DUS <- 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: 0x1b51aefbd10 [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, 11 Jan 2024 03:30:55 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: 548b5371c1284a289a56bd548f566d77 <- openai-processing-ms: 9 <- strict-transport-security: max-age=15724800; includeSubDomains <- CF-Cache-Status: DYNAMIC * Added cookie __cf_bm="9VP2ephmPEwC71B5lBP4v29lm6gJSWMxjcZ0u64sB1I-1704943855-1-AegdqTlCQjP4Z2AnpN2HcDhK84tVUnS5SEFSGDmHGJ0g2pQvIlUaGVIvBSMIQ0I4qJnJy7rk9TKNg4uRZkgvW7w=" for domain api.openai.com, path /, expire 1704945655 <- Set-Cookie: __cf_bm=9VP2ephmPEwC71B5lBP4v29lm6gJSWMxjcZ0u64sB1I-1704943855-1-AegdqTlCQjP4Z2AnpN2HcDhK84tVUnS5SEFSGDmHGJ0g2pQvIlUaGVIvBSMIQ0I4qJnJy7rk9TKNg4uRZkgvW7w=; path=/; expires=Thu, 11-Jan-24 04:00:55 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None * Added cookie _cfuvid="T5C43Pc1Gwyucx8Tjl2im0DEqTb9.KZrVUBgiC.bLM8-1704943855558-0-604800000" for domain api.openai.com, path /, expire 0 <- Set-Cookie: _cfuvid=T5C43Pc1Gwyucx8Tjl2im0DEqTb9.KZrVUBgiC.bLM8-1704943855558-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None <- Server: cloudflare <- CF-RAY: 843a15785f3d7180-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 #0 to host api.openai.com left intact * WARNING: failed to open cookie file "" * Found bundle for host: 0x1b51aefbd10 [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, 11 Jan 2024 03:30:55 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: 7ec3d979aa5d7f3d936d025edada992a <- openai-processing-ms: 10 <- strict-transport-security: max-age=15724800; includeSubDomains <- CF-Cache-Status: DYNAMIC * Added cookie __cf_bm="3m98c.J.EUQfBJg.b7lLJjc0W9AcUG1QEHwST5SyLoc-1704943855-1-ATGW7RyaPLaKU3QvJlzFQeeMzfjDjSW8MtMGA6BBg9z8az09AQg84VQvy1psRaHUVMiIAHD5W9vDh6QI0r3WM+Y=" for domain api.openai.com, path /, expire 1704945655 <- Set-Cookie: __cf_bm=3m98c.J.EUQfBJg.b7lLJjc0W9AcUG1QEHwST5SyLoc-1704943855-1-ATGW7RyaPLaKU3QvJlzFQeeMzfjDjSW8MtMGA6BBg9z8az09AQg84VQvy1psRaHUVMiIAHD5W9vDh6QI0r3WM+Y=; path=/; expires=Thu, 11-Jan-24 04:00:55 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None * Added cookie _cfuvid="W443W5lSUkUhwyN06aHBkCqDb8fw1IolUGaSJIWRGfM-1704943855753-0-604800000" for domain api.openai.com, path /, expire 0 <- Set-Cookie: _cfuvid=W443W5lSUkUhwyN06aHBkCqDb8fw1IolUGaSJIWRGfM-1704943855753-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None <- Server: cloudflare <- CF-RAY: 843a15798fda7180-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 #0 to host api.openai.com left intact [1] "\n1 retry " * WARNING: failed to open cookie file "" * Found bundle for host: 0x1b51a9ffa70 [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, 11 Jan 2024 03:34: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: 1dd5466ec8f18d91495960062502553e <- openai-processing-ms: 8 <- strict-transport-security: max-age=15724800; includeSubDomains <- CF-Cache-Status: DYNAMIC * Added cookie __cf_bm="OMNPAj2Ael3UI4SNmZoz9_pST8Er9na6DiaiuVpofp0-1704944084-1-ASeREzA26OpXTN/23sXnD2UnHa68YI6EJeC4b/sPssZMrf/kjIRKmMSxl2l8dcEu09D75peDP1hqhhJtq1LBiCg=" for domain api.openai.com, path /, expire 1704945884 <- Set-Cookie: __cf_bm=OMNPAj2Ael3UI4SNmZoz9_pST8Er9na6DiaiuVpofp0-1704944084-1-ASeREzA26OpXTN/23sXnD2UnHa68YI6EJeC4b/sPssZMrf/kjIRKmMSxl2l8dcEu09D75peDP1hqhhJtq1LBiCg=; path=/; expires=Thu, 11-Jan-24 04:04:44 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None * Added cookie _cfuvid="heXCMLpoo5E97NZOS.TJ0t_7p0lB3LjhdgW8O_Fx12w-1704944084503-0-604800000" for domain api.openai.com, path /, expire 0 <- Set-Cookie: _cfuvid=heXCMLpoo5E97NZOS.TJ0t_7p0lB3LjhdgW8O_Fx12w-1704944084503-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None <- Server: cloudflare <- CF-RAY: 843a1b0f2f94bb53-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 #1 to host api.openai.com left intact * WARNING: failed to open cookie file "" * Found bundle for host: 0x1b51a9ffa70 [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, 11 Jan 2024 03:34: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: 469c918caa64cdd806e6dfc3d2f212e3 <- openai-processing-ms: 11 <- strict-transport-security: max-age=15724800; includeSubDomains <- CF-Cache-Status: DYNAMIC * Added cookie __cf_bm="c5n.Pl_kaN8T2gbpDDwD2yXc_Mz4396bYyaJJOeakXc-1704944084-1-AdFTzj+QcNH4cr3u2LZ+eDw7vgVYZKuSYxrIdYrqi0L3evY3wGzgCDlnvZ+MqiQJ0HQ89e+DnRgNZSNXxVf1c10=" for domain api.openai.com, path /, expire 1704945884 <- Set-Cookie: __cf_bm=c5n.Pl_kaN8T2gbpDDwD2yXc_Mz4396bYyaJJOeakXc-1704944084-1-AdFTzj+QcNH4cr3u2LZ+eDw7vgVYZKuSYxrIdYrqi0L3evY3wGzgCDlnvZ+MqiQJ0HQ89e+DnRgNZSNXxVf1c10=; path=/; expires=Thu, 11-Jan-24 04:04:44 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None * Added cookie _cfuvid="MRNmx.dXzPEzaf6qEe6NdKFKf.2ydxV88p5j6SUEQk4-1704944084885-0-604800000" for domain api.openai.com, path /, expire 0 <- Set-Cookie: _cfuvid=MRNmx.dXzPEzaf6qEe6NdKFKf.2ydxV88p5j6SUEQk4-1704944084885-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None <- Server: cloudflare <- CF-RAY: 843a1b11983abb53-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 #1 to host api.openai.com left intact * WARNING: failed to open cookie file "" * Found bundle for host: 0x1b51a9ffa70 [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, 11 Jan 2024 03:34:45 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: 58377979666d11c902f53cd402a6551f <- openai-processing-ms: 11 <- strict-transport-security: max-age=15724800; includeSubDomains <- CF-Cache-Status: DYNAMIC * Added cookie __cf_bm="kXdGmWaG06IFE_NYR8uYFf7MuRa315yvs84vTU4z7ho-1704944085-1-Ac5VWpXDuUmqUKBCmOnOiMg4RRVCFDL8z8XlFCoP8WGfox8Iy97wiR5xPRaAqbZYwPiwz4IVjQaEHTMe13qorp0=" for domain api.openai.com, path /, expire 1704945885 <- Set-Cookie: __cf_bm=kXdGmWaG06IFE_NYR8uYFf7MuRa315yvs84vTU4z7ho-1704944085-1-Ac5VWpXDuUmqUKBCmOnOiMg4RRVCFDL8z8XlFCoP8WGfox8Iy97wiR5xPRaAqbZYwPiwz4IVjQaEHTMe13qorp0=; path=/; expires=Thu, 11-Jan-24 04:04:45 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None * Added cookie _cfuvid="UkZoOQ5Gb6ZIZh4ixojtdsYaQdrPFqziMP_yyZgjG9w-1704944085078-0-604800000" for domain api.openai.com, path /, expire 0 <- Set-Cookie: _cfuvid=UkZoOQ5Gb6ZIZh4ixojtdsYaQdrPFqziMP_yyZgjG9w-1704944085078-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None <- Server: cloudflare <- CF-RAY: 843a1b12b87fbb53-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 #1 to host api.openai.com left intact * WARNING: failed to open cookie file "" * Found bundle for host: 0x1b51a9ffa70 [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, 11 Jan 2024 03:34:45 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: 465addafa94abdd1ec4ef72716b4e582 <- openai-processing-ms: 9 <- strict-transport-security: max-age=15724800; includeSubDomains <- CF-Cache-Status: DYNAMIC * Added cookie __cf_bm="dcwaOZ.bE0qRkV3Jmu9LJiArRhcO2mC9j4JU4p9nMIk-1704944085-1-Ac14vSUHADm3uJlI+n2R0MrZY+zi/tu2Ylzm8XyRTeEQLOEydhTW5DQuQV4gfXIY7d592hXF0QaICb97Xm320c8=" for domain api.openai.com, path /, expire 1704945885 <- Set-Cookie: __cf_bm=dcwaOZ.bE0qRkV3Jmu9LJiArRhcO2mC9j4JU4p9nMIk-1704944085-1-Ac14vSUHADm3uJlI+n2R0MrZY+zi/tu2Ylzm8XyRTeEQLOEydhTW5DQuQV4gfXIY7d592hXF0QaICb97Xm320c8=; path=/; expires=Thu, 11-Jan-24 04:04:45 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None * Added cookie _cfuvid="skTwqitwbFeJU0xB92f7UZ0FiSLOrVh74M3J9UAqVDk-1704944085278-0-604800000" for domain api.openai.com, path /, expire 0 <- Set-Cookie: _cfuvid=skTwqitwbFeJU0xB92f7UZ0FiSLOrVh74M3J9UAqVDk-1704944085278-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None <- Server: cloudflare <- CF-RAY: 843a1b1408d8bb53-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 #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 * checking PDF version of manual ... [14s] OK * checking HTML version of manual ... OK * DONE Status: 1 ERROR, 2 NOTEs