There was definitely a bug in the code:
This line is call originally without the num_workers, which leads to running with 4 worker processes always (because it is the parameter default of process_folder:
result = process_folder(api_key, folder_path, prompt, detail, max_tokens, pre_prompt, post_prompt,
num_workers=worker_slider_local)
More over, I added the rate_limiter class, which throttles the calls after 10 processed images in 1 minute.
I commented this out, because running with only 1 thread was sufficient to get not a rate limit error.
There was definitely a bug in the code: This line is call originally without the num_workers, which leads to running with 4 worker processes always (because it is the parameter default of process_folder: result = process_folder(api_key, folder_path, prompt, detail, max_tokens, pre_prompt, post_prompt, num_workers=worker_slider_local)
More over, I added the rate_limiter class, which throttles the calls after 10 processed images in 1 minute. I commented this out, because running with only 1 thread was sufficient to get not a rate limit error.