반응형
블로그 이미지
개발자로서 현장에서 일하면서 새로 접하는 기술들이나 알게된 정보 등을 정리하기 위한 블로그입니다. 운 좋게 미국에서 큰 회사들의 프로젝트에서 컬설턴트로 일하고 있어서 새로운 기술들을 접할 기회가 많이 있습니다. 미국의 IT 프로젝트에서 사용되는 툴들에 대해 많은 분들과 정보를 공유하고 싶습니다.
솔웅

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

글 보관함

카테고리

'Introduction'에 해당되는 글 2

  1. 2023.03.25 Chat GPT Plugin - Introduction - PlugIn flow
  2. 2023.01.03 Get Started - Introduction


반응형

https://platform.openai.com/docs/plugins/introduction

 

OpenAI API

An API for accessing new AI models developed by OpenAI

platform.openai.com

 

Chat Plugins 

Limited Alpha

Learn how to build a plugin that allows ChatGPT to intelligently call your API.

 

ChatGPT가 API를 지능적으로 call 할 수 있도록 하는 플러그인을 빌드하는 방법을 알아보세요.

 

Introduction

OpenAI plugins connect ChatGPT to third-party applications. These plugins enable ChatGPT to interact with APIs defined by developers, enhancing ChatGPT's capabilities and allowing it to perform a wide range of actions.

 

OpenAI 플러그인은 ChatGPT를 타사 애플리케이션에 연결합니다. 이러한 플러그인을 통해 ChatGPT는 개발자가 정의한 API와 상호 작용하여 ChatGPT의 기능을 향상하고 광범위한 작업을 수행할 수 있습니다.

 

  • Plugins can allow ChatGPT to do things like:
  • 플러그인을 통해 ChatGPT는 다음과 같은 작업을 수행할 수 있습니다.
  • Retrieve real-time information; e.g., sports scores, stock prices, the latest news, etc.
  • 실시간 정보 검색 예: 스포츠 점수, 주가, 최신 뉴스 등
  • Retrieve knowledge-base information; e.g., company docs, personal notes, etc.
  • 지식 기반 정보를 검색합니다. 예: 회사 문서, 개인 메모 등
  • Perform actions on behalf of the user; e.g., booking a flight, ordering food, etc.
  • 사용자를 대신하여 작업을 수행합니다. 예: 비행기 예약, 음식 주문 등

 

Plugins are in a limited alpha and may not yet be accessible to you. Please join the waitlist to get access. During the alpha, we will be working closely with users and developers to iterate on the plugin system, which may evolve significantly.

 

플러그인은 제한된 알파 상태이며 아직 액세스할 수 없을겁니다. 액세스하려면 대기자 명단에 등록하십시오. 알파 기간 동안 우리는 사용자 및 개발자와 긴밀히 협력하여 크게 발전할 수 있는 플러그인 시스템을 반복할 것입니다.

 

Plugin developers expose one or more API endpoints, accompanied by a standardized manifest file and an OpenAPI specification. These define the plugin's functionality, allowing ChatGPT to consume the files and make calls to the developer-defined APIs.

 

플러그인 개발자는 표준화된 매니페스트 파일 및 OpenAPI 사양과 함께 하나 이상의 API 엔드포인트를 노출합니다. 이들은 플러그인의 기능을 정의하여 ChatGPT가 파일을 사용하고 개발자 정의 API를 호출할 수 있도록 합니다.

 

The AI model acts as an intelligent API caller. Given an API spec and a natural-language description of when to use the API, the model proactively calls the API to perform actions. For instance, if a user asks, "Where should I stay in Paris for a couple nights?", the model may choose to call a hotel reservation plugin API, receive the API response, and generate a user-facing answer combining the API data and its natural language capabilities.

 

AI 모델은 지능형 API 호출자 역할을 합니다. API 사양과 API 사용 시기에 대한 자연어 설명이 주어지면 모델은 사전에 API를 호출하여 작업을 수행합니다. 예를 들어 사용자가 "파리에서 며칠 밤을 묵어야 합니까?"라고 묻는 경우 모델은 호텔 예약 플러그인 API를 호출하고 API 응답을 수신하고 API 데이터를 결합한 사용자 대면 답변을 생성하도록 선택할 수 있습니다. 그리고 ChatGPT의 자연 언어 기능으로 이를 처리 할 것입니다.

 

Over time, we anticipate the system will evolve to accommodate more advanced use cases.

 

시간이 지남에 따라 시스템이 고급 사용 사례를 수용하도록 발전할 것으로 예상합니다.

 

Plugin flow

To build a plugin, it is important to understand the end-to-end flow.

 

플러그인을 구축하려면 end-to-end 흐름을 이해하는 것이 중요합니다.

 

  1. Create a manifest file and host it at yourdomain.com/.well-known/ai-plugin.json
    매니페스트 파일을 만들고 yourdomain.com/.well-known/ai-plugin.json에서 호스트합니다. 
    • The file includes metadata about your plugin (name, logo, etc.), details about authentication required (type of auth, OAuth URLs, etc.), and an OpenAPI spec for the endpoints you want to expose.
    • 이 파일에는 플러그인에 대한 메타데이터(이름, 로고 등), 필요한 인증에 대한 세부 정보(인증 유형, OAuth URL 등), 노출하려는 엔드포인트에 대한 OpenAPI 사양이 포함됩니다.
    • The model will see the OpenAPI description fields, which can be used to provide a natural language description for the different fields.
    • 모델은 다양한 필드에 대한 자연어 설명을 제공하는 데 사용할 수 있는 OpenAPI 설명 필드를 볼 수 있습니다.
    • We suggest exposing only 1-2 endpoints in the beginning with a minimum number of parameters to minimize the length of the text. The plugin description, API requests, and API responses are all inserted into the conversation with ChatGPT. This counts against the context limit of the model.
    • 텍스트 길이를 최소화하기 위해 최소한의 매개변수로 처음에 1-2개의 endpoint만 노출하는 것이 좋습니다. 플러그인 설명, API 요청 및 API 응답은 모두 ChatGPT와의 대화에 삽입됩니다. 이는 모델의 컨텍스트 제한에 포함됩니다.

 

  1. Register your plugin in the ChatGPT UI
    • Select the plugin model from the top drop down, then select “Plugins”, “Plugin Store”, and finally “Install an unverified plugin” or “Develop your own plugin”.
    • 상단 드롭다운에서 플러그인 모델을 선택한 다음 "플러그인", "플러그인 스토어"를 선택하고 마지막으로 "확인되지 않은 플러그인 설치" 또는 "자체 플러그인 개발"을 선택합니다.
    • If authentication is required, provide an OAuth 2 client_id and client_secret or an API key 
    • 인증이 필요한 경우 OAuth 2 client_id 및 client_secret 또는 API 키를 제공하십시오.

 

  1. Users activate your plugin
    사용자가 플러그인을 활성화합니다. 
    • Users must manually activate your plugin in the ChatGPT UI. (ChatGPT will not use your plugin by default.)
    • 사용자는 ChatGPT UI에서 플러그인을 수동으로 활성화해야 합니다. (ChatGPT는 기본적으로 플러그인을 사용하지 않습니다.)
    • During the alpha, plugin developers will be able to share their plugin with 15 additional users (only other developers can install unverified plugins currently). Overtime we will roll out a way to submit your plugin for review to be exposed to all of ChatGPT’s user base.
    • 알파 기간 동안 플러그인 개발자는 15명의 추가 사용자와 플러그인을 공유할 수 있습니다(현재 다른 개발자만 확인되지 않은 플러그인을 설치할 수 있음). 시간이 지나면 모든 ChatGPT 사용자 기반에 노출될 검토를 위해 플러그인을 제출하는 방법을 출시할 것입니다.
    • If auth is required, users will be redirected via OAuth to your plugin; you can optionally create new accounts here as well.
    • 인증이 필요한 경우 사용자는 OAuth를 통해 플러그인으로 리디렉션됩니다. 선택적으로 여기에서 새 계정을 만들 수도 있습니다.
    • In the future, we hope to build features to help users discover useful & popular plugins.
    • 앞으로는 사용자가 유용하고 인기 있는 플러그인을 찾는 데 도움이 되는 기능을 구축할 수 있기를 바랍니다.

 

  1. Users begin a conversation
    • OpenAI will inject a compact description of your plugin in a message to ChatGPT, invisible to end users. This will include the plugin description, endpoints, and examples.
    • OpenAI는 최종 사용자에게 보이지 않는 ChatGPT 메시지에 플러그인에 대한 간략한 설명을 삽입합니다. 여기에는 플러그인 설명, 끝점 및 예제가 포함됩니다.
    • When a user asks a relevant question, the model may choose to invoke an API call from your plugin if it seems relevant; for POST requests, we require that developers build a user confirmation flow.
    • 사용자가 관련 질문을 할 때 모델은 관련이 있다고 판단되면 플러그인에서 API call을 호출하도록 선택할 수 있습니다. POST 요청의 경우 개발자가 사용자 확인 흐름을 구축해야 합니다.
    • The model will incorporate the API results into its response to the user.
    • 모델은 API 결과를 사용자에 대한 응답에 통합합니다.
    • The model might include links returned from API calls in its response. These will be displayed as rich previews (using the OpenGraph protocol, where we pull the site_name, title, description, image, and url fields)"
    • 모델은 응답에 API 호출에서 반환된 링크를 포함할 수 있습니다. 풍부한 미리보기로 표시됩니다(Site_name, 제목, 설명, 이미지 및 URL 필드를 가져오는 OpenGraph 프로토콜 사용)"

 

Currently, we will be sending the user’s country and state in the Plugin conversation header (if you are in California for example, it would look like {"openai-subdivision-1-iso-code": "US-CA"}. For further data sources, users will have to opt in via a consent screen. This is useful for shopping, restaurants, weather, and more. You can read more in our developer terms of use.

 

현재 플러그인 대화 헤더에 사용자의 국가와 주를 보낼 예정입니다(예를 들어 캘리포니아에 있는 경우 {"openai-subdivision-1-iso-code": "US-CA"}와 같이 표시됨). 추가 데이터 소스를 사용하려면 사용자가 동의 화면을 통해 선택해야 합니다. 이것은 쇼핑, 레스토랑, 날씨 등에 유용합니다. 개발자 사용 약관에서 자세한 내용을 읽을 수 있습니다.

 

반응형

'Open AI > CHAT PLUGINS' 카테고리의 다른 글

Chat GPT Plugin - Plugin policies  (0) 2023.04.04
Chat GPT Plugin - Plugins in production  (0) 2023.04.04
Chat GPT Plugin - Example plugins  (0) 2023.04.04
Chat GPT Plugin - Authentication  (0) 2023.04.04
Chat GPT Plugin - Getting started  (0) 2023.03.27

Get Started - Introduction

2023. 1. 3. 11:35 | Posted by 솔웅


반응형

https://beta.openai.com/docs/introduction/overview

 

OpenAI API

An API for accessing new AI models developed by OpenAI

beta.openai.com

Introduction

 

Overview

 

The OpenAI API can be applied to virtually any task that involves understanding or generating natural language or code. We offer a spectrum of models with different levels of power suitable for different tasks, as well as the ability to fine-tune your own custom models. These models can be used for everything from content generation to semantic search and classification.

 

OpenAI API는 자연어 또는 코드를 이해하거나 생성하는 것과 관련된 거의 모든 작업에 적용할 수 있습니다. 우리는 다양한 작업에 적합한 다양한 수준의 성능을 가진 다양한 모델과 사용자 지정 모델을 미세 조정할 수 있는 기능을 제공합니다. 이러한 모델은 콘텐츠 생성에서 시맨틱 검색 및 분류에 이르기까지 모든 것에 사용할 수 있습니다.


Key concepts

We recommend completing our quickstart tutorial to get acquainted with key concepts through a hands-on, interactive example.

 

실습 대화형 예제를 통해 주요 개념에 익숙해지려면 빠른 시작 자습서를 완료하는 것이 좋습니다.

 

 

Prompts and completions

The completions endpoint is at the center of our API. It provides a simple interface to our models that is extremely flexible and powerful. You input some text as a prompt, and the model will generate a text completion that attempts to match whatever context or pattern you gave it. For example, if you give the API the prompt, “Write a tagline for an ice cream shop”, it will return a completion like “We serve up smiles with every scoop!”

Designing your prompt is essentially how you “program” the model, usually by providing some instructions or a few examples. This is different from most other NLP services which are designed for a single task, such as sentiment classification or named entity recognition. Instead, the completions endpoint can be used for virtually any task including content or code generation, summarization, expansion, conversation, creative writing, style transfer, and more.

 

완료 끝점은 API의 중심에 있습니다. 매우 유연하고 강력한 모델에 간단한 인터페이스를 제공합니다. 일부 텍스트를 프롬프트로 입력하면 모델은 사용자가 제공한 컨텍스트나 패턴과 일치하도록 시도하는 텍스트 완성을 생성합니다. 예를 들어 API에 "아이스크림 가게에 대한 태그라인 작성"이라는 프롬프트를 제공하면 "We serve up smiles with every scoop!"과 같은 완성을 반환합니다.
프롬프트를 디자인하는 것은 기본적으로 모델을 "프로그래밍"하는 방법이며 일반적으로 몇 가지 지침이나 몇 가지 예를 제공합니다. 이는 감정 분류 또는 명명된 엔터티 인식과 같은 단일 작업용으로 설계된 대부분의 다른 NLP 서비스와 다릅니다. 대신 완성 엔드포인트는 콘텐츠 또는 코드 생성, 요약, 확장, 대화, 창작, 스타일 전송 등을 포함한 거의 모든 작업에 사용할 수 있습니다.

 

Tokens

Our models understand and process text by breaking it down into tokens. Tokens can be words or just chunks of characters. For example, the word “hamburger” gets broken up into the tokens “ham”, “bur” and “ger”, while a short and common word like “pear” is a single token. Many tokens start with a whitespace, for example “ hello” and “ bye”.

The number of tokens processed in a given API request depends on the length of both your inputs and outputs. As a rough rule of thumb, 1 token is approximately 4 characters or 0.75 words for English text. One limitation to keep in mind is that your text prompt and generated completion combined must be no more than the model's maximum context length (for most models this is 2048 tokens, or about 1500 words). Check out our tokenizer tool to learn more about how text translates to tokens.

 

우리의 모델은 텍스트를 토큰으로 분해하여 텍스트를 이해하고 처리합니다. 토큰은 단어일 수도 있고 문자 덩어리일 수도 있습니다. 예를 들어 "hamburger"라는 단어는 "ham", "bur" 및 "ger" 토큰으로 분해되는 반면 "pear"와 같은 짧고 일반적인 단어는 단일 토큰입니다. 많은 토큰이 공백으로 시작합니다(예: "hello" 및 "bye").
지정된 API 요청에서 처리되는 토큰 수는 입력 및 출력의 길이에 따라 다릅니다. 대략적인 경험 법칙으로 1 토큰은 약 4자 또는 영어 텍스트의 경우 0.75단어입니다. 명심해야 할 한 가지 제한 사항은 텍스트 프롬프트와 생성된 완성을 합친 것이 모델의 최대 컨텍스트 길이(대부분의 모델의 경우 2048 토큰 또는 약 1500단어)를 넘지 않아야 한다는 것입니다. 텍스트가 토큰으로 변환되는 방법에 대해 자세히 알아보려면 토크나이저 도구를 확인하십시오.

Models

The API is powered by a set of models with different capabilities and price points. Our base GPT-3 models are called Davinci, Curie, Babbage and Ada. Our Codex series is a descendant of GPT-3 that’s been trained on both natural language and code. To learn more, visit our models documentation.

 

API는 기능과 가격대가 다른 일련의 모델로 구동됩니다. 기본 GPT-3 모델은 Davinci, Curie, Babbage 및 Ada라고 합니다. Codex 시리즈는 자연어와 코드 모두에 대해 교육을 받은 GPT-3의 후예입니다. 자세한 내용은 모델 설명서를 참조하십시오.


Next steps

  • Keep our usage policies in mind as you start building your application.
  • Explore our examples library for inspiration.
  • Jump into one of our guides to start building.

애플리케이션 구축을 시작할 때 사용 정책을 염두에 두십시오.
영감을 얻으려면 예제 라이브러리를 살펴보십시오.
구축을 시작하려면 가이드 중 하나로 이동하세요.

Guides

 

 

 

 

 

 

 

 

 

반응형

'Open AI > GET STARTED' 카테고리의 다른 글

Get Started - Data usage policies  (0) 2023.03.06
Get Started - Tutorials  (3) 2023.03.06
Get Started - Usage policies  (0) 2023.01.05
Get Started - Models (Added GPT-4 03/14/2023)  (1) 2023.01.05
Get Started - Libraries  (0) 2023.01.04
Get Started - Quick Start Tutorial  (0) 2023.01.03
이전 1 다음