Sumidu/openaiassistant

file_ids is not working in assisstant_create function

Opened this issue · 0 comments

I uploaded a file using file_upload function:

file_obj = file_upload("myfilename").

I saw the id of the file in file_obj$id. Then I tried to create the assistant with the file:

assistant <-
assistant_create(
assistant_name,
instructions,
#model = "gpt-4-turbo-preview",
model = "gpt-3.5-turbo",
file_ids = file_obj$id # c(file_obj) # list(file_obj_id)
)

I received the error message:

Error in httr2::req_perform():
! HTTP 400 Bad Request.
Backtrace:

  1. openaiassistant::assistant_create(...)
  2. httr2::req_perform(...)