OpenAI model version used gpt-4o-mini
You need OpenAI API key .
export API_KEY=<>
./file-go-openai -h
Options:
-f, --file <path>/<file> Path to the file to be reviewed [required]
-m, --message <string> Message to OpenAI model [required OR use '-p']
-p, --pattern <string> Pattern name [required OR use '-m']
-o, --out Save file's review output to a file [optional]
-v, --version Display OpenAI model version
For example for OpenAI in version GPT-4.0 .
If you encounter such error, it's because there are some API limitations.
Request too large for gpt-4 in organization <org> on tokens per min (TPM): Limit 10000, Requested 43034. The input or output tokens must be reduced in order to run successfully. Visit https://platform.openai.com/account/rate-limits to learn more.
More about Rate limits for tier-1 you can find here. In tier-1 for GPT-4, TPM is 10,000. You might be using different tier than tier-1 e.g. free, tier-2 etc. where TPM values are different.
What are tokens and how to count them you can find here .
analyze_requests_init
analyze_html
./file-go-openai \
-f /tmp/input.log \
-m "please list all uniq Request lines in one section and uniq User-Agent lines in separate section."
./file-go-openai \
-f /tmp/input.log \
-m "please list all uniq Request lines in one section and uniq User-Agent lines in separate section." \
-o
Patterns can be find here .
./file-go-openai \
-f /tmp/input.log \
-p analyze_requests_init \
-o