9 lines
294 B
Bash
Executable File
9 lines
294 B
Bash
Executable File
#!/bin/bash
|
|
|
|
curl \
|
|
-sSL \
|
|
-H 'Content-Type: application/json' \
|
|
-H 'Authorization: Bearer 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 ' \
|
|
-d '{"prompt":"//'"$1"'","max_tokens":500,"stop":"//","n":3}' \
|
|
https://api.openai.com/v1/engines/code-davinci-002/completions
|