Issues using windows command terminal with openai API

C:\Users\d>curl https://api.openai.com/v1/engines/davinci/completions ^
More? -H “Content-Type: application/json” ^
More? -H “Authorization: Bearer -*************************” ^
More? -d ‘{“prompt”: “This is a test”, “max_tokens”: 5}’
{
“error”: {
“code”: null,
“message”: “Your request contained invalid JSON: Expecting value: line 1 column 1 (char 0)”,
“param”: null,
“type”: “invalid_request_error”
}
}
curl: (6) Could not resolve host: This is a test,
curl: (6) Could not resolve host: max_tokens
curl: (3) [globbing] unmatched close brace/bracket in column 2

1 Like

It looks like your cURL command has not been correctly formatted. Is there a reason you’re using it from the terminal/CMD line instead of from the playground or through the API?

I’m trying to fine-tune a model with a large dataset of screenplays and was following OPENAI’s documentation for fine-tuning the model. From what I could tell in the documentation, it looked like everything was done from the command line terminal. When that didn’t work I tried doing something simpler like connect from the terminal/CMD line using the dev quickstart tutorial.

2 Likes

I see. No problem, is your dataset ready for fine tuning? Or were you just trying the curl command to see if anything would happen? You need to copy the request from the fine tuning docs carefully and then paste it into the terminal. I don’t think it’ll work with Windows command line out of the box, so maybe download git bash or a better Windows command line tool.

I can help you with your cURL requests for fine tuning here in this thread if you like.

2 Likes