Skip to content

Instantly share code, notes, and snippets.

@koorukuroo
Created September 25, 2024 01:33
Show Gist options
  • Save koorukuroo/366e6569d621309be3ce540df9781b09 to your computer and use it in GitHub Desktop.
Save koorukuroo/366e6569d621309be3ce540df9781b09 to your computer and use it in GitHub Desktop.
import openai
openai.api_key = 'sk-API키를 입력합니다'
def lambda_handler(event, context):
message = openai.ChatCompletion.create(
model="gpt-4o-mini", # 사용 모델
messages=[
{"role": "system", "content": "너는 클라우드 전문 개발자야."},
{"role": "user", "content": "나는 신한투자증권에 입사하려는 개발자야. 클라우드를 공부해야 할 필요가 있을까?"}
] # 전달 메세지
)
return message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment