-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP Error after mapping over some rows #8
Comments
Hi @rawuph, My first suspicion is that this is linked to too many API calls in a short time. Could you please provide us with an MRE? Perhaps a dummy data frame where the problem occurs. For instance, using the following test_df <- data.frame(call_string=paste("Say", 1:20)) I am not able to reproduce the issue you mentioned. Thanks. |
Thanks for getting back! Indeed, this works for me as well. My df contains a much more complex prompt that requires a fair bit of reasoning, perhaps it is related to that. Here is an (unrelated) MRE that throws an error for me at index 15 at the first run, and index 12 at the 2nd try.
|
@rawuph : thanks for the MRE. I could reproduce the problem and then briefly tested it by re-writing map as a for-loop:
Basically, this confirm's @JLDC' guess that the OpenAI API issues a RateLimitError. It works for a while and then fails. @JLDC : we should add an option setting to switch memory off, I'll add a ticket to the backlog. also we need a better error-handling for such cases.
|
@umatter thank you for looking into it and providing the workaround. It appears I did not notice that it keeps the conversation's context when you call chat() multiple times, although reading through the documentation again, it is indeed mentioned. I am essentially trying to find the easiest solution to run the same single-shot prompt consisting of a fixed part A and a variable part B on ~2000 rows. do you expect this would work nicely with clearing the chatlog or should I look for other ways, e.g. |
@rawuph : my guess is if your use case is close to your example, the simple trick with clearing the chatlog should do. the lower-level functions like |
I get a reproducible error where a fresh R session works for something like this as long as its sufficiently few rows (<5)
for larger datasets, i.e. n = 10, i get something like this, although the index at which it occurs varies
After this error occurred once, simply using the chat() function throws the same error, which is resolved when I restart the session.
The text was updated successfully, but these errors were encountered: