english2 / openai.py
yosuke-i's picture
Upload 11 files
5b07cee verified
raw
history blame contribute delete
384 Bytes
# from openai import OpenAI
# client = OpenAI()
# def exec_gpt4(prompt):
# openai.api_key = 'sk-proj-arrJA9XvKeo5nfYXLgmeT3BlbkFJNnqFQL9G8qTdYXsBvhJc'
# response = client.chat.completions.create(
# model='gpt-4o',
# messages=[
# {"role": "user", "content": prompt},
# ],
# )
# return response.choices[0].message.content.strip()