-
Notifications
You must be signed in to change notification settings - Fork 47
Description
I am new to LLMs in Matlab.
I am trying to run the example "Analyze Scientific Papers Using ChatGPT™ Function Calls"
This is the sequence of instructions BEFORE the error:
api_key = "key-here"
api_key =
"key-here"
f = openAIFunction("writePaperDetails", "Function to write paper details to a table.");
f = addParameter(f, "name", type="string", description="Name of the paper.");
f = addParameter(f, "url", type="string", description="URL containing the paper.");
However, when I try to execute the following instruction, an error message appears:
paperVerifier = openAIChat("You are an expert in filtering scientific papers. " + ...
"Given a certain topic, you are able to decide if the paper" + ...
" fits the given topic or not.");
Error using llms.internal.getApiKeyFromNvpOrEnv (line 20)
Unable to find API key. Either set environment variable OPENAI_API_KEY or specify name-value
argument "APIKey".
Error in openAIChat (line 141)
this.APIKey = llms.internal.getApiKeyFromNvpOrEnv(nvp,"OPENAI_API_KEY");
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Any idea of what I am doing wrong?
Thank you.
Francisco