ben-aaron188 / rgpt3

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

No text returned from API #3

Closed JoeFernando closed 1 year ago

JoeFernando commented 1 year ago

First-off, thank you for the library.

When I execute core for one request, I am not getting any feedback, it looks empty or am I missing something.

My code:

example_1 = gpt3_single_completion(prompt_input = "Write a cynical text about human nature"
                                   , temperature = 0.7
                                   , max_tokens = 25,
                                   , n = 1)

This is the when I get in return

> example_1
[[1]]
   n                                  prompt
1: 1 Write a cynical text about human nature

[[2]]
                              param_prompt      param_model param_max_tokens param_temperature param_top_p
1: Write a cynical text about human nature text-davinci-003               25               0.7           1
   param_n param_presence_penalty param_frequency_penalty param_best_of
1:       1                      0                       0             1
JoeFernando commented 1 year ago

Actually, I worked it out as soon as I posted this. My API key was missing the last character!

It works and great to have this library. Thanks once again.