first commit

This commit is contained in:
hoon
2026-09-01 01:25:09 +09:00
commit 3c99ee6ff8
18 changed files with 4825 additions and 0 deletions

14
archive/openai.py Normal file
View File

@@ -0,0 +1,14 @@
import openai
# API 키 설정 (환경 변수 등에서 가져옴)
openai.api_key = "YOUR_API_KEY"
response = openai.ChatCompletion.create(
model="gpt-3.5-turbo", # 또는 "gpt-4"
messages=[
{"role": "system", "content": "You are a helpful assistant."}, # 역할 설정
{"role": "user", "content": "Hello!"} # 사용자 입력
]
)
print(response.choices[0].message.content)