2023-10-17から1日間の記事一覧

ChatGPT自動生成

import os import openai # APIキーの設定 openai.api_key = 'API KEY' # GPT-3モデルの指定 model_engine = "gpt-3.5-turbo" messages = [{"role": "system", "content": "You are a helpful assistant."}] def gpt(user_input): messages.append({"role": …

ChatGPTとPythonの組み合わせ

note.com from gpt3z import gpt a=gpt("AIについて本を書こうと思う。五章構成で英語の目次と各章の概要を書け") b=gpt(f"{a} この目次の第一章を日本語で書け") c=gpt(f"{a} この目次の第二章を日本語で書け") d=gpt(f"{a} この目次の第三章を日本語で書け…

いつの間にかGPT4 APIが解放されていた

import os import openai # APIキーの設定 openai.api_key = 'API KEY' # GPT-4モデルの指定 #model_engine = "gpt-3.5-turbo" model_engine = "gpt-4" messages = [{"role": "system", "content": "You are a helpful assistant."}] def gptChat(user_input…

動いたChatコード

import os import openai # APIキーの設定 openai.api_key = 'API KEY' # GPT-3モデルの指定 model_engine = "gpt-3.5-turbo" messages = [{"role": "system", "content": "You are a helpful assistant."}] def gptChat(user_input): messages.append({"rol…

しゃべるGPT

togetter.com

斜めになった写真を補正する

PerspectiveImageCorrection whitebreath.hatenablog.com

ChatGPT-4V

qiita.com