* using log directory ‘/srv/hornik/tmp/CRAN/openaistream.Rcheck’ * using R Under development (unstable) (2024-01-17 r85813) * using platform: x86_64-pc-linux-gnu * R was compiled by Debian clang version 17.0.6 (3) Debian flang-new version 17.0.6 (3) * running under: Debian GNU/Linux trixie/sid * 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 ... [3s/4s] 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 executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘openaistream’ can be installed ... [5s/5s] 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 ... [0s/0s] OK * checking whether the package can be loaded with stated dependencies ... [0s/0s] OK * checking whether the package can be unloaded cleanly ... [0s/0s] OK * checking whether the namespace can be loaded with stated dependencies ... [0s/0s] OK * checking whether the namespace can be unloaded cleanly ... [0s/0s] OK * checking loading without being on the library search path ... [0s/0s] 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 ... [2s/2s] OK * checking Rd files ... [0s/0s] 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 ... [0s/0s] OK * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... [4s/231s] ERROR Running ‘testthat.R’ [3s/231s] 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.5.0 with GnuTLS/3.8.2 > > test_check("openaistream") * WARNING: failed to open cookie file "" * Found bundle for host: 0x55979660cdb0 [can multiplex] * Re-using existing connection with host api.openai.com * [HTTP/2] [11] OPENED stream for https://api.openai.com/v1/embeddings * [HTTP/2] [11] [:method: POST] * [HTTP/2] [11] [:scheme: https] * [HTTP/2] [11] [:authority: api.openai.com] * [HTTP/2] [11] [:path: /v1/embeddings] * [HTTP/2] [11] [user-agent: httr2/1.0.0 r-curl/5.2.0 libcurl/8.5.0] * [HTTP/2] [11] [accept: */*] * [HTTP/2] [11] [accept-encoding: deflate, gzip, br, zstd] * [HTTP/2] [11] [authorization: Bearer ] * [HTTP/2] [11] [content-type: application/json] * [HTTP/2] [11] [content-length: 57] -> POST /v1/embeddings HTTP/2 -> Host: api.openai.com -> User-Agent: httr2/1.0.0 r-curl/5.2.0 libcurl/8.5.0 -> Accept: */* -> Accept-Encoding: deflate, gzip, br, zstd -> Authorization: Bearer -> Content-Type: application/json -> Content-Length: 57 -> >> {"model":"text-embedding-ada-002","input":"who are you?"} <- HTTP/2 401 <- date: Thu, 18 Jan 2024 17:35:29 GMT <- content-type: application/json; charset=utf-8 <- content-length: 496 <- vary: Origin <- x-request-id: ecf5ae7cf7283990204dd51f343209d7 <- strict-transport-security: max-age=15724800; includeSubDomains <- cf-cache-status: DYNAMIC * Added cookie __cf_bm="4DcwJhRy1teNi9TsNIM0PgpnrKNSslV0WL6YDjtNrG0-1705599329-1-AWQ4DJhYlXgv7LcAkIKuKRu1a8tKglahJqL+sbtCMPgdLMgSt2x8x2wLBYNWccQrMDBbhUHg0wbpnCm/EeoovcQ=" for domain api.openai.com, path /, expire 1705601129 <- set-cookie: __cf_bm=4DcwJhRy1teNi9TsNIM0PgpnrKNSslV0WL6YDjtNrG0-1705599329-1-AWQ4DJhYlXgv7LcAkIKuKRu1a8tKglahJqL+sbtCMPgdLMgSt2x8x2wLBYNWccQrMDBbhUHg0wbpnCm/EeoovcQ=; path=/; expires=Thu, 18-Jan-24 18:05:29 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None * Added cookie _cfuvid="XXzbMLn4jYo6yTF581zYc8dulhVBuE5Ck5ipAFhEdjs-1705599329214-0-604800000" for domain api.openai.com, path /, expire 0 <- set-cookie: _cfuvid=XXzbMLn4jYo6yTF581zYc8dulhVBuE5Ck5ipAFhEdjs-1705599329214-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None <- server: cloudflare <- cf-ray: 8478983e9f1fc2f0-VIE <- 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: 0x55979660cdb0 [can multiplex] * Re-using existing connection with host api.openai.com * [HTTP/2] [33] OPENED stream for https://api.openai.com/v1/threads//messages * [HTTP/2] [33] [:method: POST] * [HTTP/2] [33] [:scheme: https] * [HTTP/2] [33] [:authority: api.openai.com] * [HTTP/2] [33] [:path: /v1/threads//messages] * [HTTP/2] [33] [user-agent: httr2/1.0.0 r-curl/5.2.0 libcurl/8.5.0] * [HTTP/2] [33] [accept: */*] * [HTTP/2] [33] [accept-encoding: deflate, gzip, br, zstd] * [HTTP/2] [33] [authorization: Bearer ] * [HTTP/2] [33] [openai-beta: assistants=v1] * [HTTP/2] [33] [content-type: application/json] * [HTTP/2] [33] [content-length: 51] -> POST /v1/threads//messages HTTP/2 -> Host: api.openai.com -> User-Agent: httr2/1.0.0 r-curl/5.2.0 libcurl/8.5.0 -> Accept: */* -> Accept-Encoding: deflate, gzip, br, zstd -> Authorization: Bearer -> OpenAI-Beta: assistants=v1 -> Content-Type: application/json -> Content-Length: 51 -> >> {"file_ids":[null],"role":"user","content":"hello"} <- HTTP/2 401 <- date: Thu, 18 Jan 2024 17:35:31 GMT <- content-type: application/json <- content-length: 231 <- www-authenticate: Basic realm="OpenAI API" <- openai-version: 2020-10-01 <- x-request-id: 0c5a59bc37472a4c53ffd75d0e3cf6a3 <- openai-processing-ms: 11 <- strict-transport-security: max-age=15724800; includeSubDomains <- cf-cache-status: DYNAMIC * Added cookie __cf_bm="WgmQflaywaQIL7duZSxV6VUqFq0OswuIQno_TWv5Vfo-1705599331-1-Acixq6bNZ0ZZlRlhIX9K68sbFKyAAy+MVxaY37RLt8qm/nYAbRTU54xWpf6SUZTvXoPEb5Y+9MuRlpwjI6/7SRU=" for domain api.openai.com, path /, expire 1705601131 <- set-cookie: __cf_bm=WgmQflaywaQIL7duZSxV6VUqFq0OswuIQno_TWv5Vfo-1705599331-1-Acixq6bNZ0ZZlRlhIX9K68sbFKyAAy+MVxaY37RLt8qm/nYAbRTU54xWpf6SUZTvXoPEb5Y+9MuRlpwjI6/7SRU=; path=/; expires=Thu, 18-Jan-24 18:05:31 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None * Added cookie _cfuvid="HCCYguQtRr2euyY6RPj0vWMV4GpY91QBcFJYXygDocQ-1705599331583-0-604800000" for domain api.openai.com, path /, expire 0 <- set-cookie: _cfuvid=HCCYguQtRr2euyY6RPj0vWMV4GpY91QBcFJYXygDocQ-1705599331583-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None <- server: cloudflare <- cf-ray: 8478984d6e48c2f0-VIE <- 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: 0x55979660cdb0 [can multiplex] * Re-using existing connection with host api.openai.com * [HTTP/2] [35] OPENED stream for https://api.openai.com/v1/threads//messages * [HTTP/2] [35] [:method: GET] * [HTTP/2] [35] [:scheme: https] * [HTTP/2] [35] [:authority: api.openai.com] * [HTTP/2] [35] [:path: /v1/threads//messages] * [HTTP/2] [35] [user-agent: httr2/1.0.0 r-curl/5.2.0 libcurl/8.5.0] * [HTTP/2] [35] [accept: */*] * [HTTP/2] [35] [accept-encoding: deflate, gzip, br, zstd] * [HTTP/2] [35] [authorization: Bearer ] * [HTTP/2] [35] [content-type: application/json] * [HTTP/2] [35] [openai-beta: assistants=v1] -> GET /v1/threads//messages HTTP/2 -> Host: api.openai.com -> User-Agent: httr2/1.0.0 r-curl/5.2.0 libcurl/8.5.0 -> Accept: */* -> Accept-Encoding: deflate, gzip, br, zstd -> Authorization: Bearer -> Content-Type: application/json -> OpenAI-Beta: assistants=v1 -> <- HTTP/2 401 <- date: Thu, 18 Jan 2024 17:35:31 GMT <- content-type: application/json <- content-length: 231 <- www-authenticate: Basic realm="OpenAI API" <- openai-version: 2020-10-01 <- x-request-id: d88a1c93f61c493c4bae6a2e82aa9923 <- openai-processing-ms: 10 <- strict-transport-security: max-age=15724800; includeSubDomains <- cf-cache-status: DYNAMIC * Added cookie __cf_bm="hcc3xMih5NV2p_xYY51oFYHqklMXjsn_.LsELLJkLiM-1705599331-1-Afmv/82MfzzKg989/QyAPLO5AfR8PNwD4Lp9A4CdYhKJ8fM0O1XDww3XUWdjYZXeUtSzK8q8qcaGh/OM5A7fVAk=" for domain api.openai.com, path /, expire 1705601131 <- set-cookie: __cf_bm=hcc3xMih5NV2p_xYY51oFYHqklMXjsn_.LsELLJkLiM-1705599331-1-Afmv/82MfzzKg989/QyAPLO5AfR8PNwD4Lp9A4CdYhKJ8fM0O1XDww3XUWdjYZXeUtSzK8q8qcaGh/OM5A7fVAk=; path=/; expires=Thu, 18-Jan-24 18:05:31 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None * Added cookie _cfuvid="bXoLntfOdcqKo8XDgPaIDQwMmRdadc9zYFeoz9HmStQ-1705599331792-0-604800000" for domain api.openai.com, path /, expire 0 <- set-cookie: _cfuvid=bXoLntfOdcqKo8XDgPaIDQwMmRdadc9zYFeoz9HmStQ-1705599331792-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None <- server: cloudflare <- cf-ray: 8478984e9ff5c2f0-VIE <- 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: 0x55979660cdb0 [can multiplex] * Re-using existing connection with host api.openai.com * [HTTP/2] [5] OPENED stream for https://api.openai.com/v1/threads * [HTTP/2] [5] [:method: POST] * [HTTP/2] [5] [:scheme: https] * [HTTP/2] [5] [:authority: api.openai.com] * [HTTP/2] [5] [:path: /v1/threads] * [HTTP/2] [5] [user-agent: httr2/1.0.0 r-curl/5.2.0 libcurl/8.5.0] * [HTTP/2] [5] [accept: */*] * [HTTP/2] [5] [accept-encoding: deflate, gzip, br, zstd] * [HTTP/2] [5] [authorization: Bearer ] * [HTTP/2] [5] [openai-beta: assistants=v1] * [HTTP/2] [5] [content-type: application/json] * [HTTP/2] [5] [content-length: 2] -> POST /v1/threads HTTP/2 -> Host: api.openai.com -> User-Agent: httr2/1.0.0 r-curl/5.2.0 libcurl/8.5.0 -> Accept: */* -> Accept-Encoding: deflate, gzip, br, zstd -> Authorization: Bearer -> OpenAI-Beta: assistants=v1 -> Content-Type: application/json -> Content-Length: 2 -> >> [] <- HTTP/2 401 <- date: Thu, 18 Jan 2024 17:39:13 GMT <- content-type: application/json <- content-length: 231 <- www-authenticate: Basic realm="OpenAI API" <- openai-version: 2020-10-01 <- x-request-id: 56da1136aa62f0caefcbebf105975928 <- openai-processing-ms: 1 <- strict-transport-security: max-age=15724800; includeSubDomains <- cf-cache-status: DYNAMIC * Added cookie __cf_bm="rCoRMV3RBIL.STwBzVXBcdMBOu6DWw57M0sdr8CUQO0-1705599553-1-AWXSC5EcneyM4kgn22C+lKM8y1SbjjGv7usyqWeSI+btPl2bjDle9e15XB6q10DV0xfoiAzlGiGSD5qJ7IOUExA=" for domain api.openai.com, path /, expire 1705601353 <- set-cookie: __cf_bm=rCoRMV3RBIL.STwBzVXBcdMBOu6DWw57M0sdr8CUQO0-1705599553-1-AWXSC5EcneyM4kgn22C+lKM8y1SbjjGv7usyqWeSI+btPl2bjDle9e15XB6q10DV0xfoiAzlGiGSD5qJ7IOUExA=; path=/; expires=Thu, 18-Jan-24 18:09:13 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None * Added cookie _cfuvid="ktiWhkHV9Z.CwTMnIGiVOX5GxkIksoE5ciFYg_zrxT0-1705599553069-0-604800000" for domain api.openai.com, path /, expire 0 <- set-cookie: _cfuvid=ktiWhkHV9Z.CwTMnIGiVOX5GxkIksoE5ciFYg_zrxT0-1705599553069-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None <- server: cloudflare <- cf-ray: 84789db5a93cc289-VIE <- 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: 0x55979660cdb0 [can multiplex] * Re-using existing connection with host api.openai.com * [HTTP/2] [9] OPENED stream for https://api.openai.com/v1/assistants * [HTTP/2] [9] [:method: POST] * [HTTP/2] [9] [:scheme: https] * [HTTP/2] [9] [:authority: api.openai.com] * [HTTP/2] [9] [:path: /v1/assistants] * [HTTP/2] [9] [user-agent: httr2/1.0.0 r-curl/5.2.0 libcurl/8.5.0] * [HTTP/2] [9] [accept: */*] * [HTTP/2] [9] [accept-encoding: deflate, gzip, br, zstd] * [HTTP/2] [9] [authorization: Bearer ] * [HTTP/2] [9] [openai-beta: assistants=v1] * [HTTP/2] [9] [content-type: application/json] * [HTTP/2] [9] [content-length: 1468] -> POST /v1/assistants HTTP/2 -> Host: api.openai.com -> User-Agent: httr2/1.0.0 r-curl/5.2.0 libcurl/8.5.0 -> Accept: */* -> Accept-Encoding: deflate, gzip, br, zstd -> Authorization: Bearer -> OpenAI-Beta: assistants=v1 -> Content-Type: application/json -> Content-Length: 1468 -> >> 1468 bytes of binary data <- HTTP/2 401 <- date: Thu, 18 Jan 2024 17:39:13 GMT <- content-type: application/json <- content-length: 231 <- www-authenticate: Basic realm="OpenAI API" <- openai-version: 2020-10-01 <- x-request-id: 6ed1a7bf2770e4ee69ffb4d9951d1c6f <- openai-processing-ms: 9 <- strict-transport-security: max-age=15724800; includeSubDomains <- cf-cache-status: DYNAMIC * Added cookie __cf_bm="tpM5jgxAMQwSsamX0raa26UMaR2nQvX0hdTVAcvYIAc-1705599553-1-AcbUPJYFmXhHeimoJYt3Yvdqu+q/b4dCZooOLrY0bWE2ASuGlRIxz9gJNda6mi3Wjfp/6Bgh1RLA2iWlGDyNUt4=" for domain api.openai.com, path /, expire 1705601353 <- set-cookie: __cf_bm=tpM5jgxAMQwSsamX0raa26UMaR2nQvX0hdTVAcvYIAc-1705599553-1-AcbUPJYFmXhHeimoJYt3Yvdqu+q/b4dCZooOLrY0bWE2ASuGlRIxz9gJNda6mi3Wjfp/6Bgh1RLA2iWlGDyNUt4=; path=/; expires=Thu, 18-Jan-24 18:09:13 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None * Added cookie _cfuvid="A_xcABWvkp3HRKEjCjRCK5BYuNliNd8_2zh.Cf7nvNk-1705599553473-0-604800000" for domain api.openai.com, path /, expire 0 <- set-cookie: _cfuvid=A_xcABWvkp3HRKEjCjRCK5BYuNliNd8_2zh.Cf7nvNk-1705599553473-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None <- server: cloudflare <- cf-ray: 84789db82ea1c289-VIE <- 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: 0x55979660cdb0 [can multiplex] * Re-using existing connection with host api.openai.com * [HTTP/2] [11] OPENED stream for https://api.openai.com/v1/assistants * [HTTP/2] [11] [:method: POST] * [HTTP/2] [11] [:scheme: https] * [HTTP/2] [11] [:authority: api.openai.com] * [HTTP/2] [11] [:path: /v1/assistants] * [HTTP/2] [11] [user-agent: httr2/1.0.0 r-curl/5.2.0 libcurl/8.5.0] * [HTTP/2] [11] [accept: */*] * [HTTP/2] [11] [accept-encoding: deflate, gzip, br, zstd] * [HTTP/2] [11] [authorization: Bearer ] * [HTTP/2] [11] [openai-beta: assistants=v1] * [HTTP/2] [11] [content-type: application/json] * [HTTP/2] [11] [content-length: 704] -> POST /v1/assistants HTTP/2 -> Host: api.openai.com -> User-Agent: httr2/1.0.0 r-curl/5.2.0 libcurl/8.5.0 -> Accept: */* -> Accept-Encoding: deflate, gzip, br, zstd -> 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/2 401 <- date: Thu, 18 Jan 2024 17:39:13 GMT <- content-type: application/json <- content-length: 231 <- www-authenticate: Basic realm="OpenAI API" <- openai-version: 2020-10-01 <- x-request-id: 238a0c894a25d06e9702bc87ff7bb369 <- openai-processing-ms: 12 <- strict-transport-security: max-age=15724800; includeSubDomains <- cf-cache-status: DYNAMIC * Added cookie __cf_bm="pQp5fq66rNrvt0ZbTOi4BGvfk1nfCdzMk.b_5LVmB_k-1705599553-1-AWYCuAwngsHecYCn4WW+/SKTMJFPbRX/luXHR0uLOIydcHaKXtOpfb9KhpMnzUfHknA67BC3Bjvb9CFoKk/kKaE=" for domain api.openai.com, path /, expire 1705601353 <- set-cookie: __cf_bm=pQp5fq66rNrvt0ZbTOi4BGvfk1nfCdzMk.b_5LVmB_k-1705599553-1-AWYCuAwngsHecYCn4WW+/SKTMJFPbRX/luXHR0uLOIydcHaKXtOpfb9KhpMnzUfHknA67BC3Bjvb9CFoKk/kKaE=; path=/; expires=Thu, 18-Jan-24 18:09:13 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None * Added cookie _cfuvid="YuFjXVMB5J0_2yxB_bftW6X8S.Bwx7Siu9n5M4VUEDo-1705599553685-0-604800000" for domain api.openai.com, path /, expire 0 <- set-cookie: _cfuvid=YuFjXVMB5J0_2yxB_bftW6X8S.Bwx7Siu9n5M4VUEDo-1705599553685-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None <- server: cloudflare <- cf-ray: 84789db968efc289-VIE <- 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: 0x55979660cdb0 [can multiplex] * Re-using existing connection with host api.openai.com * [HTTP/2] [13] OPENED stream for https://api.openai.com/v1/threads/runs * [HTTP/2] [13] [:method: POST] * [HTTP/2] [13] [:scheme: https] * [HTTP/2] [13] [:authority: api.openai.com] * [HTTP/2] [13] [:path: /v1/threads/runs] * [HTTP/2] [13] [user-agent: httr2/1.0.0 r-curl/5.2.0 libcurl/8.5.0] * [HTTP/2] [13] [accept: */*] * [HTTP/2] [13] [accept-encoding: deflate, gzip, br, zstd] * [HTTP/2] [13] [authorization: Bearer ] * [HTTP/2] [13] [openai-beta: assistants=v1] * [HTTP/2] [13] [content-type: application/json] * [HTTP/2] [13] [content-length: 91] -> POST /v1/threads/runs HTTP/2 -> Host: api.openai.com -> User-Agent: httr2/1.0.0 r-curl/5.2.0 libcurl/8.5.0 -> Accept: */* -> Accept-Encoding: deflate, gzip, br, zstd -> 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/2 401 <- date: Thu, 18 Jan 2024 17:39:13 GMT <- content-type: application/json <- content-length: 231 <- www-authenticate: Basic realm="OpenAI API" <- openai-version: 2020-10-01 <- x-request-id: 06db1c817f10f26bde1293fbc2a4bac4 <- openai-processing-ms: 13 <- strict-transport-security: max-age=15724800; includeSubDomains <- cf-cache-status: DYNAMIC * Added cookie __cf_bm="p3nY5So5.aETTnkYHJ4qxcYnsXyZOQnP8DOA6SP9vss-1705599553-1-Ab5eiCBsEkBJfztLqySoJV2egD7illXDplvJLlmJNcfyUf1ePrpT+WTMPSCs18YQCJBFEJmuV9TEy60vigRYNXg=" for domain api.openai.com, path /, expire 1705601353 <- set-cookie: __cf_bm=p3nY5So5.aETTnkYHJ4qxcYnsXyZOQnP8DOA6SP9vss-1705599553-1-Ab5eiCBsEkBJfztLqySoJV2egD7illXDplvJLlmJNcfyUf1ePrpT+WTMPSCs18YQCJBFEJmuV9TEy60vigRYNXg=; path=/; expires=Thu, 18-Jan-24 18:09:13 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None * Added cookie _cfuvid="45aP1oEk4_7fRi1vgU0KiqCGGs2jxhYv5udEIq4kXG4-1705599553886-0-604800000" for domain api.openai.com, path /, expire 0 <- set-cookie: _cfuvid=45aP1oEk4_7fRi1vgU0KiqCGGs2jxhYv5udEIq4kXG4-1705599553886-0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None <- server: cloudflare <- cf-ray: 84789dbabb75c289-VIE <- 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 ... [3s/3s] OK * checking HTML version of manual ... [1s/1s] OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * DONE Status: 1 ERROR, 2 NOTEs