Programing/ChatGPT

Create an Assistant

기운씨 2024. 12. 26. 20:42

OpenAI 는 2023년 11월 7일부터 Assistants API 를 제공해주는데 현재까지도 베타 버전이다.

개발자들은 이 API 를 통해 Assistant 를 생성 할 수 있고 Platform Dashboard 에서도 Assistant 를 생성 할 수 있다.

Assistants API 를 통해 Assistant 를 생성하는 Curl 예제는 다음과 같다.

curl "https://api.openai.com/v1/assistants" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "OpenAI-Beta: assistants=v2" \
-d '{
  "instructions": "You are a personal math tutor. Write and run code to answer math questions.",
  "name": "Math Tutor",
  "tools": [{"type": "code_interpreter"}],
  "model": "gpt-4o"
}'

출처 :: https://platform.openai.com/docs/assistants/quickstart#step-1-create-an-assistant

Platform Dashboard 에서는 Assistant 를 생성하고 Playground 를 통해 테스트도 가능하다.