14,954
edits
| Line 307: | Line 307: | ||
# Revise the frequency of API requests. To achieve this, incorporate a [[Sleep]] function between each API request within the script. For more information on rate limits, consult OpenAI's documentation at the following link: https://platform.openai.com/docs/guides/rate-limits. | # Revise the frequency of API requests. To achieve this, incorporate a [[Sleep]] function between each API request within the script. For more information on rate limits, consult OpenAI's documentation at the following link: https://platform.openai.com/docs/guides/rate-limits. | ||
# See more details on [[Sleep]] random seconds in programming | # See more details on [[Sleep]] random seconds in programming | ||
=== How to fix "zsh: command not found: -d" === | |||
Error condition when I [https://platform.openai.com/docs/api-reference/vector-stores/create create vector store] | |||
<pre> | |||
curl https://api.openai.com/v1/vector_stores \ | |||
-H "Authorization: Bearer $OPENAI_API_KEY" \ | |||
-H "Content-Type: application/json" \ | |||
-H "OpenAI-Beta: assistants=v2" | |||
-d '{ | |||
"name": "Enter your preferred name here" | |||
}' | |||
</pre> | |||
Corrected Command: | |||
<pre> | |||
curl https://api.openai.com/v1/vector_stores \ | |||
-H "Authorization: Bearer $OPENAI_API_KEY" \ | |||
-H "Content-Type: application/json" \ | |||
-H "OpenAI-Beta: assistants=v2" \ | |||
-d '{ | |||
"name": "Enter your preferred name here" | |||
}' | |||
</pre> | |||
The backslash {{kbd | key=<nowiki>\</nowiki>}} at the end of each line indicates that the command is not yet finished and will continue on the next line. Ensure that there are no extra characters or commands after the -d parameter or any other parameters to avoid similar errors. | |||
=== How to fix "You exceeded your current quota, please check your plan and billing details." === | === How to fix "You exceeded your current quota, please check your plan and billing details." === | ||