"parse error: trailing garbage\n                              \"message\": \"'sdasd' is not of type 'inte\n                     (right here) ------^\n"
"non-numeric argument to binary operator"
"error chatstream data_source open is fail"

length(text$all_resp) (`actual`) not equal to 2 (`expected`).

  `actual`: 0
`expected`: 2

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) ------^"
  ""

embed$data$embedding[[1]] has type 'NULL', not 'double'.

embed<-handle_openai$embeddings$create(model = "text-embedding-ada-002", input = "who are you?",verbosity = 3)
embed<-handle_openai$embeddings$create(model = "text-embedding-ada-002", input = "who are you?",verbosity = 4)

file_id$filename (`actual`) not equal to "train.jsonl" (`expected`).

`actual` is NULL
`expected` is a character vector ('train.jsonl')

file_id <- handle_openai$files$upload(path = train_file_path,purpose = "fine-tune")
res<-handle_openai$files$upload(path = train_file_path,purpose = "fine-tune",verbosity = 5)
json_data <- fromJSON(sprintf("[%s]", gsub(",$","",gsub("\n", ",", file_context))))
res<-handle_openai$files$upload(path = NULL,purpose = "fine-tune",verbosity = 3)
res<-handle_openai$files$upload(path = "/tmp/sadasdsdad",purpose = "fine-tune",verbosity = 3)

file_list$success is not NULL

`actual` is a logical vector (FALSE)
`expected` is NULL

Error: lexical error: invalid char in json text.
                                      [FALSE] [Error in `req_perform()
                     (right here) ------^

Error in `expect_contains(names(job_events$data), "data")`: `object` and `expected` must both be vectors

test_that("test fileload and fine train",{
job<-handle_openai$fine_tuning$create(model = "gpt-3.5-turbo",training_file = file_id$id)
res<-handle_openai$fine_tuning$create(model = "gpt-3.5-turbo",training_file = file_id$id,verbosity = 4)
job_list<-handle_openai$fine_tuning$list(limit = 2, verbosity = 3)