Row 3904

Row ID: 3904 | Dataset Entry | Axioma AXP Content Repository

Content Data

This page contains data entry 3904 from the Axioma AXP content repository. The structured data below represents the complete record for this entry.

I am completely new, so bear with me.

I have Python 3.11.4 installed on my Mac.

According to the OpenAI Quickstart guide, I must install the OpenAI Python library by running '**pip install --upgrade openai**' in my terminal. (Side note, I am using the Terminal on Mac. When I launch Jupyter Notebook via Anaconda, I get another terminal that pops up, I haven't been touching that, not sure if I need to.)

Next it says to set up your API Key (for all projects or just a single project). I know my API Key. But I get stuck here. It states to go in the terminal to Edit Bash Profile and Add Environmental Variable (export OPENAI\_API\_KEY='my\_api\_goes\_here'). I am not able to do the 'add environmental variable' part.

When I try to run their example notebook:

`from openai import OpenAI`

`client = OpenAI()`

`completion = client.chat.completions.create(`

`model="gpt-3.5-turbo",`

`messages=[{"role": "system", "content": "You are a poetic assistant, skilled in explaining complex programming concepts with creative flair."},`

`{"role": "user", "content": "Compose a poem that explains the concept of recursion in programming."}])`

`print(completion.choices[0].message)`

I get the following error: OpenAIError: The api\_key client option must be set either by passing api\_key to the client or by setting the OPENAI\_API\_KEY environment variable.

I am assuming this is because I didn't complete the API Key set-up process.

FieldValue
text I am completely new, so bear with me. I have Python 3.11.4 installed on my Mac. According to the OpenAI Quickstart guide, I must install the OpenAI Python library by running '**pip install --upgrade openai**' in my terminal. (Side note, I am using the Terminal on Mac. When I launch Jupyter Notebook via Anaconda, I get another terminal that pops up, I haven't been touching that, not sure if I need to.) Next it says to set up your API Key (for all projects or just a single project). I know my A…
label r/gpt3
dataType post
communityName r/GPT3
datetime 2024-03-29
username_encoded Z0FBQUFBQm5Lakwxbi1tYVF1OHpGZEtMWlZxckV5aGFBbE5GRk0xREIwTmlNMGsyamVCSW5pamRVSFlDQnRqRUVrelVwcVF4MEdyVnBMME5VcVd5T0l4WHVFd3RtcHdydy1tUjBBUGYtc3VLUElkMHA4N05lTUk9
url_encoded Z0FBQUFBQm5Lak9FV2NmdHRTM0NWVnMtYVowOFpLYnptajd1QnZDVWI1RThyOWdIS2U3NG1uSVVEVXhObUwzY0FEYU1nRzd2dUozdmFDMUUxYzd2eWl0cDc2MjRSNURaRm1kTmUyNloyQUNPOV9lUF9BMDY4bXhZSVJlX2VGVFVVLXE4Q2J3SzlVSko2SGFEWU1EOUpRbVpkMkNRakdLWlZCQjBjWm9mX2VtTk9penVGRWVaakZHMUt1TjBhMjY4ZnpoVmJnRlNPVlVz

Raw Record

{
  "text": "I am completely new, so bear with me.\n\nI have Python 3.11.4 installed on my Mac.\n\nAccording to the OpenAI Quickstart guide, I must install the OpenAI Python library by running '**pip install --upgrade openai**' in my terminal. (Side note, I am using the Terminal on Mac. When I launch Jupyter Notebook via Anaconda, I get another terminal that pops up, I haven't been touching that, not sure if I need to.)\n\nNext it says to set up your API Key (for all projects or just a single project). I know my API Key. But I get stuck here. It states to go in the terminal to Edit Bash Profile and Add Environmental Variable (export OPENAI\\_API\\_KEY='my\\_api\\_goes\\_here'). I am not able to do the 'add environmental variable' part.\n\nWhen I try to run their example notebook:\n\n`from openai import OpenAI`\n\n`client = OpenAI()`\n\n`completion = client.chat.completions.create(`\n\n`model=\"gpt-3.5-turbo\",`\n\n`messages=[{\"role\": \"system\", \"content\": \"You are a poetic assistant, skilled in explaining complex programming concepts with creative flair.\"},`\n\n`{\"role\": \"user\", \"content\": \"Compose a poem that explains the concept of recursion in programming.\"}])`\n\n`print(completion.choices[0].message)`\n\nI get the following error: OpenAIError: The api\\_key client option must be set either by passing api\\_key to the client or by setting the OPENAI\\_API\\_KEY environment variable.\n\nI am assuming this is because I didn't complete the API Key set-up process.",
  "label": "r/gpt3",
  "dataType": "post",
  "communityName": "r/GPT3",
  "datetime": "2024-03-29",
  "username_encoded": "Z0FBQUFBQm5Lakwxbi1tYVF1OHpGZEtMWlZxckV5aGFBbE5GRk0xREIwTmlNMGsyamVCSW5pamRVSFlDQnRqRUVrelVwcVF4MEdyVnBMME5VcVd5T0l4WHVFd3RtcHdydy1tUjBBUGYtc3VLUElkMHA4N05lTUk9",
  "url_encoded": "Z0FBQUFBQm5Lak9FV2NmdHRTM0NWVnMtYVowOFpLYnptajd1QnZDVWI1RThyOWdIS2U3NG1uSVVEVXhObUwzY0FEYU1nRzd2dUozdmFDMUUxYzd2eWl0cDc2MjRSNURaRm1kTmUyNloyQUNPOV9lUF9BMDY4bXhZSVJlX2VGVFVVLXE4Q2J3SzlVSko2SGFEWU1EOUpRbVpkMkNRakdLWlZCQjBjWm9mX2VtTk9penVGRWVaakZHMUt1TjBhMjY4ZnpoVmJnRlNPVlVz"
}

Entry Information