ben-aaron188 / rgpt3

Making requests from R to the GPT models
GNU General Public License v3.0
101 stars 16 forks source link

Error in core_output$chatgpt_role[i] <- request_content$choices[[i]]$message$role : replacement has length zero #13

Closed gunawebs closed 1 year ago

gunawebs commented 1 year ago
dt_prompts = data.table::data.table('prompts_content' = chatPrompts$ChatGPT_Prompt, 'prompts_role' = chatPrompts$prompts_role,'prompt_id' = chatPrompts$PromptId)
  gptResponse <- chatgpt(prompt_role_var = dt_prompts$prompts_role
          , prompt_content_var = dt_prompts$prompts_content
          , id_var = dt_prompts$prompt_id, param_max_tokens=10000, param_n=5)

when I try to run the above code, it gives this error

Error in core_output$chatgpt_role[i] <- request_content$choices[[i]]$message$role : 
replacement has length zero
gunawebs commented 1 year ago

I dont think I did any change, but now it seemed to work.

ben-aaron188 commented 1 year ago

OK - seems to have been an installation issue. Let me know if anything else is not working.