Difference between revisions of "OpenAI - ChatGPT"
Adelo Vieira (talk | contribs) (Created page with "* https://openai.com/ * https://openai.com/product/gpt-4 * How to (Actually) Use ChatGPT A simple guide to unlocking infinite potential: : https://www.ambersof.com/en/updat...") |
Adelo Vieira (talk | contribs) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | * https://chat.openai.com/chat | ||
* https://openai.com/ | * https://openai.com/ | ||
* https://openai.com/product/gpt-4 | * https://openai.com/product/gpt-4 | ||
+ | : https://www.youtube.com/watch?v=outcGtbnMuQ | ||
+ | |||
+ | |||
+ | |||
+ | * Este video creo que está bueno: https://www.youtube.com/watch?v=FdZ8LKiJBhQ | ||
+ | |||
Line 6: | Line 13: | ||
: https://www.ambersof.com/en/updates/how-to-actually-use-chatgpt | : https://www.ambersof.com/en/updates/how-to-actually-use-chatgpt | ||
: https://www.youtube.com/watch?v=bpocpZiu7iM | : https://www.youtube.com/watch?v=bpocpZiu7iM | ||
+ | |||
+ | * Chat GPT explained 7 BUSINESSES Free to start: https://www.youtube.com/watch?v=B7Om_b4evdA | ||
Line 16: | Line 25: | ||
+ | chat.py | ||
+ | <syntaxhighlight lang="python"> | ||
import openai | import openai | ||
openai.api_key = 'sk-HcxYxH6ZFxAdKQen7vT3BlbkFJySUJdpZ3HW0bq2oqY7cD' | openai.api_key = 'sk-HcxYxH6ZFxAdKQen7vT3BlbkFJySUJdpZ3HW0bq2oqY7cD' | ||
− | |||
− | |||
def generate_chat_response(prompt): | def generate_chat_response(prompt): | ||
message = [ | message = [ |
Latest revision as of 19:30, 30 March 2023
- Este video creo que está bueno: https://www.youtube.com/watch?v=FdZ8LKiJBhQ
- How to (Actually) Use ChatGPT A simple guide to unlocking infinite potential:
- https://www.ambersof.com/en/updates/how-to-actually-use-chatgpt
- https://www.youtube.com/watch?v=bpocpZiu7iM
- Chat GPT explained 7 BUSINESSES Free to start: https://www.youtube.com/watch?v=B7Om_b4evdA
- ChatGPT extension for VSCode: https://marketplace.visualstudio.com/items?itemName=timkmecl.chatgpt
- ChatGPT API Transition Guide: https://help.openai.com/en/articles/7042661-chatgpt-api-transition-guide
- https://platform.openai.com/account/api-keys
chat.py
import openai
openai.api_key = 'sk-HcxYxH6ZFxAdKQen7vT3BlbkFJySUJdpZ3HW0bq2oqY7cD'
def generate_chat_response(prompt):
message = [
{"role": "system", "content": ""},
{"role": "assistant", "content": ""},
{"role": "user", "content": prompt}
]
completion = openai.ChatCompletion.create(model="gpt-3.5-turbo", messages=message)
return completion.choices[0].message.content
def main():
while True:
prompt = input("\nYou: ")
response = generate_chat_response(prompt)
print("ChatGPT: ", response)
if __name__ == "__main__":
main()
This is not about OpenAI but take a look too: The AI Search Engine You Control: https://you.com/