-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access to OpenAI’s GPT4 not working #731
Comments
Typo correction on the above: here’s the script (the error appears on: ‘
from openai import OpenAI‘) |
What is the error???? When asking questions about software that involve error messages, please always include the full error messages, always. Otherwise people won't be able to help because it's unclear what exactly is wrong with the code. Another important thing is to format you code properly. Reading the messy code you posted is infuriating. People are going to get mad and skip your question instead of answering. |
Thanks for replying, here is a screenshot Regards,RafiRafi Yoeli, PhD.24 Dubnov StreetTel-Aviv 6495701, Israel Cell: +972-54-4446993E-mail: ***@***.***: www.linkedin.com/in/Rafi-YoeliThis e-mail message (including any accompanying attachments) is proprietary to Dr. Rafi Yoeli. If you receive this communication in error, please notify the sender immediately and delete it from your computer. Thank you.Sent from my iPadOn Feb 6, 2024, at 23:30, ForceBru ***@***.***> wrote:
I get an error
What is the error???? When asking questions about software that involve error messages, please always include the full error messages, always. Otherwise people won't be able to help because it's unclear what exactly is wrong with the code. Another important thing is to format you code properly. Reading the messy code you posted is infuriating. People are going to get mad and skip your question instead of answering.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Thanks. But a code I have that is an API for GPT 3.5-turbo has no problem, imports OpenAI right away with no special tricks in Pythonista, looks like this (I use it all the time):import openaidef chat(prompt): openai.api_key = "... key name ..." completion = openai.ChatCompletion.create(model="gpt-3.5-turbo",messages=[{"role": "user", "content": prompt}]) print(completion.choices[0].message["content"]) def main(): statement = "... prompt ..." prompt = ("..." + str(statement) + " ...") chat(prompt)if __name__ == "__main__": main()Rafi Yoeli, PhD.24 Dubnov StreetTel-Aviv 6495701, Israel Cell: +972-54-4446993E-mail: ***@***.***: www.linkedin.com/in/Rafi-YoeliThis e-mail message (including any accompanying attachments) is proprietary to Dr. Rafi Yoeli. If you receive this communication in error, please notify the sender immediately and delete it from your computer. Thank you.Sent from my iPadOn Feb 10, 2024, at 16:21, Christian Clauss ***@***.***> wrote:
openai is not a Pythonista built-in module.
https://omz-software.com/pythonista/docs-3.4/py3/ios/third-party-modules.html
pip install openai would be required after setting up StaSH but even then, it may not work.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Thank you! Question: where does GPT4 enter the picture (see my previous note)?RafiRafi Yoeli, PhD.24 Dubnov StreetTel-Aviv 6495701, Israel Cell: +972-54-4446993E-mail: ***@***.***: www.linkedin.com/in/Rafi-YoeliThis e-mail message (including any accompanying attachments) is proprietary to Dr. Rafi Yoeli. If you receive this communication in error, please notify the sender immediately and delete it from your computer. Thank you.Sent from my iPadOn Feb 10, 2024, at 16:36, Christian Clauss ***@***.***> wrote:
import openai
dir(openai)
from pathlib import Path
print(Path(openai.__file__).read_text())
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Try this:
|
Thanks! It seems to work technically but here’s my first question: are you GPT4? Then I tried this (wanted to see if I’ll at least get Bard if not Gemini as an answer: what is the name of Googe's Large Language Model that competes with OpenAI’s one? So what do you think? I think I’m still on GPT-3 . Any further ideas? |
I just looked into it a bit and apparently it is normal for it to say that because of the data it has been trained on. The web GPT-4 doesn't say it, but the API does. To answer your second question about not recognising Bard or Gemini, it will not recognise them because the dataset used is cut off at 2021 according to the link below. You can read more about it here: |
Excellent. Thank you! |
I’m trying to hook onto GPT4 (of course I have an openAI key). A friend sent me the access code below but Pythonista does not seem to support (I get an error) on the second line ‘from openai import OpenAI’ . Any workarounds?
import openai from openai import OpenAI
client = OpenAI(api_key="YOUR_KEY_HERE")
def chat(): prompt = input('Please write your prompt here\n') completion = client.chat.completions.create( model="gpt-4", messages=[ {"role": "user", "content": prompt} ] ) return(print(completion.choices[0].message.content))
def main(): chat()
if name == "main": main()
please send copy of reply to: rafiyoeliaero@gmail.com (for some reason the OMZ forum doesn’t let me post this)
The text was updated successfully, but these errors were encountered: