코드
import os from openai import OpenAI # OpenAI API 키 입력 client = OpenAI(api_key="sk...") # Function Calling 함수 정의 functions = [ { "name": "get_current_weather", "description": "현재 날씨를 조회합니다", "parameters": { "type": "object", "properties": { "location": { "type": "string", "description": "날씨를 알고 싶은 도시 이름" } }, "required": ["location"] } } ]