GPT3 Fine Tuning Help!

Okay, first off, I’m a total newb to most things around training my own model so go easy on me guys.

First off, I’ve installed Python 3.10 via the microsoft store.

I’m using Windows Powershell for this.

I’ve successfully installed Python but am having two issues:

  1. How do I import my API key? I copy/paste my key into the command line with the
export OPENAI_API_KEY="<OPENAI_API_KEY>"

with my key pasted in the “” and it did not work at all.

  1. Using the command
openai tools fine_tunes.prepare_data -f <LOCAL_FILE>

with my location of my .JSON file written in should work, but it gives me this error:

openai : The term 'openai' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ openai api fine_tunes.create -f C:\users\joshn\documents\dogman-test. ...
+ ~~~~~~
    + CategoryInfo          : ObjectNotFound: (openai:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Anyone got any ideas on how I can get going on what I’m doing wrong? again, my knowledge of all this is so minimal so I have no idea what I’m doing lol

1 Like

Welcome to the OpenAI community @contenthydra!

You need to add your Python installation to your Environmental Variables PATH variable because that’s how you create the “linkage” with command “openai” within Windows.

See the metioned esource at the end in order to help inform you in more detail was is going on and help you with couple other potential issues you may run into.

You’ll find that the ‘openai’ file is essentially a Bash script meant to be run through a terminal that supports that but Windows Command Prompt and PowerShell don’t support Bash scripting out of the box.

Resource:
CLI data preparation tool Windows
General API discussion

1 Like

So I downloaded gitbash, and made sure I was i my correct directory:
/c/Users/joshn/AppData/Local/Programs/Python/Python310/Scripts

When i installed openai initially, it installed it in a different location, so I just went to that PATH and copy/pasted the files it installed into my directory above ^

now, when i go to said directory and use Git Bash from that location, openai is still not a recognized command?

not sure why.