Closed vonjd closed 1 year ago
It works for me. Could you check two things?
gpt3_authenticate("/Users/.../access_key.txt")
(the path can take any form as long as you point it to a file (here called: access_key.txt
) where your API key is located.gpt3_test_completion()
work for you?If the error persists, can you provide a reproducible example?
@vonjd Did this work? Two other potential things to check are:
gpt3_authenticate("/Users/.../access_key.txt")
work without issues? Here a potential hiccup can be a missing newline after the actual key.I get the same error when i try to execute the first example: my_prompts = data.frame('prompts' = c('Complete this sentence: universities are' , 'Write a poem about music:' , 'Which colour is better and why? Red or blue?') ,'prompt_id' = c(LETTERS[1:3]))
example_2 = gpt3_completions(prompt_var = my_prompts$prompts , id_var = my_prompts$prompt_id , param_model = 'text-ada-001' , param_max_tokens = 100 , param_n = 5 , param_temperature = 0.4)
returns: To avoid an invalid_request_error
, best_of
was set to equal n
Error in core_output$gpt3[i] <- request_content$choices[[i]]$text :
replacement has length zero
I dont have a paid account with OpenAI but should be well within my API free usage limit.
i upgraded to a paid account on OpenAI and this now works!
The first example
gpt3_single_completion
throws the following error: