135201
You will be muted until you read the rules. Read them! @Rules_for_Python A group about the Python programming language. Offtopic things go here: @pythonofftopic Resources to learn python: @pythonres Group for Hy: @hylang Selenium: @SeleniumPython
i am begginer and was requesting for some tutorials to start learning?
Читать полностью…
Just think about it, you'll find less help, articles, documentation,etc regarding reactpy than using real react
Читать полностью…
it depends. for long term projects or in corporate settings, people tend to choose more common tech stack for stability and various reasons. (just my opinion)
Читать полностью…
I am executing the script in a local terminal using the command python my_script.py
Читать полностью…
ah, Windows? sorry for that then, bad luck
anyway, have you checked this code:
os.environ.get("OPENAI_API_KEY")
returned the proper value?
this is the way i did i will to pycharm terminal and i enter: ... setx OPENAI_API_KEY "my_api_key"
Читать полностью…
So, have you added the environment variable with the API key?
Читать полностью…
import os
from openai import OpenAI
client = OpenAI(
# This is the default and can be omitted
api_key=os.environ.get("OPENAI_API_KEY"),
)
chat_completion = client.chat.completions.create(
messages=[
{
"role": "user",
"content": "Say this is a test",
}
],
model="gpt-3.5-turbo",
)
Please don't ask meta questions like:
- Any user of $x here?
- Anyone used technology $y?
- Hello, I need help on $z!
Just ask about your problem directly! If you don't know what to ask, please read: http://catb.org/~esr/faqs/smart-questions.html
https://wiki.python.org/moin/BeginnersGuide/NonProgrammers
Читать полностью…
It all depends on you. It is not particularly difficult
Читать полностью…
Rule 🔟: Job posts are SPAM unless they meet the requirements. Read the rules for details.
Читать полностью…
There are no teachers here. But we can send you links for self learning
Читать полностью…
it is in version 1. so, you really can't tell how long this project will last. and does it have big company backing it.
Читать полностью…
for AI python is the best choice
and focus on python will save a lot if we want to dev a ai web app. or another suggestion about ai web app
anyone knows reactpy? if use reactpy only python is needed for web app. it is a good choice?
Читать полностью…
error message ; openai.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
Читать полностью…
0
I'm trying to use the OpenAI API in Python to create a chat completion, but I keep running into an error related to the API key. Here’s my code: