본문 바로가기
openai - 파인튜닝 현재 GPT-4로는 파인튜닝이 불가능하므로 GPT-3로 파인튜닝을 하고 있음 GPT-3 기반이 되는 학습모델은 대표적 총 4가지 1) davinci : GPT-3 시리즈 중 가장 성능이 좋은 모델, 요청당 최대 4,000개의 토근 처리 가능 (대화를 할수 있는 모델) 2) curie : 매우 유능하지만 davinci보다 빠르고 저렴 / 성능은 davinci가 우수 3) babbage : 간단한 작업이 가능하고 매우 빠르고 비용이 저렴 4) ada : 간단한 작업이 가능하므로 일반적으로 GPT-3 시리즈 중 가장 빠르고 가장 저렴 학습자료를 자세하고 다양한 형식의 prompt를 작성해야함 import time import openai # OpenAI API 키 설정 openai.api_key = "[ope.. 2023. 7. 13.
openai.Completion.create를 사용한 예제 import openai openai.api_key = "[openai_api_key]" system_message = f"You are an assistant that specializes in answering questions about office tasks and productivity, with a focus on email management. For more information, contact the representative email at rater@example.com." messages = [] important_keywords = ["업무", "이메일", "보고서", "회의", "프로젝트", "할당"] def contains_keywords(user_input): return a.. 2023. 7. 13.
openai.ChatCompletion.create를 사용한 예제 import openai openai.api_key = "[openai_api_key]" messages = [ { "role": "system", "content": "You are an assistant that specializes in answering questions about office tasks and productivity, with a focus on email management. You know the representative email address is [email protected]" }, { "role": "assistant", "content": "안녕하세요, 저는 업무 수행과 생산성에 관한 질문에 답을 제공하는 전문 도우미입니다. 특히 이메일 관리와 관련된 질문을 전문.. 2023. 7. 13.
openai.chatcompletion과 openai.Completion의 차이 기능openai.Completion.createopenai.ChatCompletion.create 목적 일반적인 텍스트 생성 대화형 채팅 입력형식 단일 프롬프트 단독 프롬프트에 응답을 얻는데 사용함 여러 채팅이력 대화의 이전 내용을 사용하여 응답을 가져오는데 사용함 다중 메시지 입력을 지원하여 질문-답변 시나리오 와 같은 대화식 시나리오에 적합 'prompt' 파라메터 프롬프트 텍스트 사용 사용되지 않음 'messages'파라메터 사용되지 않음 대화 이력 객체를 배열로 전달 파인튜닝 파인튜닝된 모델 지원 파인튜닝 지원하지 않고 기존모델에 대해서만 지원함 2023. 7. 13.
OpenAI 환경구성 - 파이썬 1. 파이썬 설치 https://www.python.org/downloads/ Download Python The official home of the Python Programming Language www.python.org 2. 비주얼스튜디오 코드 설치 https://code.visualstudio.com/ Visual Studio Code - Code Editing. Redefined Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications. Visual Studio Code is free and available on your favori.. 2023. 7. 13.
OpenAI Platform 사용 시작 https://platform.openai.com/ OpenAI Platform Explore developer resources, tutorials, API docs, and dynamic examples to get the most out of OpenAI's platform. platform.openai.com 1. openai에 계정 생성 2. 오른쪽 상단 > view API Keys 3. create new secret key 2023. 7. 13.
반응형