Python, Flask, ChatGPT API (OpenAI) 사용 예제
Python, Flask 를 이용해서 ChatGPT API 를 사용하는 간단한 예제입니다. 아래 OpenAI 사이트에서 API를 신청한 후 사용 가능합니다. app.py 에서 "your-openai-api-key"를 OpenAI 에서 발급받은 API 로 변경하시면 됩니다. https://platform.openai.com/overview OpenAI Platform Explore developer resources, tutorials, API docs, and dynamic examples to get the most out of OpenAI's platform. platform.openai.com 라이브러리 설치 $ pip install flask openai 디렉토리구조 project/ ├─ app...