# Rememberizer GPT 생성

### 전제 조건

먼저, [Rememberizer 앱 등록하기](/ko/undefined-1/integration-options/registering-rememberizer-apps.md)를 하고 적절한 설정으로 구성해야 합니다.

{% hint style="info" %}
대체 통합 방법에 관심이 있다면, Rememberizer의 의미 검색 기능에 대한 프로그래밍적 접근을 위해 [LangChain 통합](/ko/undefined-1/integration-options/langchain-integration.md)을 확인하세요.
{% endhint %}

GPT를 생성하려면 Rememberizer 앱의 승인된 요청 출처를 `https://chat.openai.com`으로 설정해야 합니다.

> 앱을 등록하려면 콜백 URL을 추가해야 하지만, 현재로서는 GPT에 작업을 추가한 후에만 콜백 URL을 찾을 수 있으므로 더미 값(예: <https://chat.openai.com)으로> 남겨두세요. 콜백 URL을 얻은 후에는 앱에 대한 올바른 URL로 업데이트해야 합니다.\
> \ <mark style="color:red;">**참고:**</mark> <mark style="color:red;">GPT는 구성 변경 후 콜백 URL을 업데이트합니다. 최신 콜백 URL을 복사하는 것을 잊지 마세요.</mark>

앱을 생성한 후, **클라이언트 ID**와 **클라이언트 비밀**을 복사하세요. 우리는 GPT를 생성할 때 이 정보를 사용할 것입니다. 이 정보를 얻는 방법에 대한 지침은 [Rememberizer 앱 승인하기](https://docs.rememberizer.ai/developer/authorizing-rememberizer-apps)에서 확인할 수 있습니다.

<figure><img src="/files/7Rzrk6JurXdahanAjNTM" alt="등록된 앱 자격 증명"><figcaption></figcaption></figure>

### GPT 생성하기

[ChatGPT UI에서 GPT 생성하기](https://chat.openai.com/gpts/editor)로 시작할 수 있습니다.

{% hint style="warning" %}
참고: 맞춤형 GPT 앱 생성은 요금제 계정에서만 가능합니다.
{% endhint %}

곧 출시: GPT 통합 아키텍처 다이어그램

이 포괄적인 시스템 다이어그램은 다음을 설명합니다:

* OpenAI GPT, Rememberizer API 및 사용자 데이터 소스 간의 전체 아키텍처
* OAuth 구성 요소가 포함된 인증 흐름
* 사용자 쿼리 흐름: GPT → Rememberizer → 데이터 소스 → 사용자로 돌아가기
* 보안 경계 및 접근 제어
* 이 통합 환경에서 Memento 필터링이 작동하는 방식
* 일반적인 상호작용 중에 접근되는 다양한 엔드포인트

#### GPT 구성

원하는 대로 정보를 입력할 수 있습니다. 다음은 시도해 볼 수 있는 예입니다:

<table><thead><tr><th width="156">필드</th><th>예시 값</th></tr></thead><tbody><tr><td>이름</td><td>RememberizerGPT</td></tr><tr><td>설명</td><td>Google Drive 및 Slack 채널의 모든 PDF, 문서, 시트, 슬라이드에 직접 이야기하세요.</td></tr><tr><td>지침</td><td>Rememberizer는 Rememberizer 도구와 원활하게 상호작용하도록 설계되어, 사용자가 Google Drive 및 Slack과 같은 여러 출처에서 데이터를 효율적으로 쿼리할 수 있도록 합니다. 주요 목표는 Rememberizer의 기능을 활용하여 사용자의 데이터에 빠르고 정확하게 접근할 수 있도록 하는 것입니다. GPT는 사용자가 쿼리를 작성하고 결과를 해석하는 데 도움을 주어 원활하고 사용자 친화적인 경험을 보장해야 합니다. 데이터 검색 및 분석을 다룰 때 특히 응답의 명확성과 정확성을 유지하는 것이 중요합니다. GPT는 간단한 데이터 조회부터 여러 매개변수나 출처를 포함한 더 복잡한 검색에 이르기까지 다양한 쿼리를 처리할 수 있어야 합니다. 사용자가 필요한 정보를 신속하고 효과적으로 접근할 수 있도록 하는 데 중점을 두어, 과정을 가능한 한 수월하게 만드는 것이 중요합니다.</td></tr></tbody></table>

#### Rememberizer 작업 생성

GPT 편집기에서:

1. "구성" 선택
2. "작업 추가"
3. 인증 유형 구성.

   * 인증 유형을 **OAuth**로 설정합니다.
   * 위 단계에서 **클라이언트 ID**와 **클라이언트 비밀**을 붙여넣습니다.
   * 권한 부여 URL: `https://api.rememberizer.ai/api/v1/auth/oauth2/authorize/`
   * 토큰 URL: `https://api.rememberizer.ai/api/v1/auth/oauth2/token/`
   * **범위**는 비워 둡니다.
   * **저장**을 클릭합니다.

   <figure><img src="/files/JWL6FbEoQHPBHPKZTmkH" alt="gpt auth type config"><figcaption></figcaption></figure>
4. Rememberizer의 OpenAPI 사양을 입력합니다. 아래 확장 가능한 내용 복사하여 **스키마** 필드에 붙여넣습니다:

<details>

<summary>Rememberizer_OpenAPI.yaml</summary>

```yaml
openapi: 3.1.0
info:
  title: Rememberizer API
  description: Rememberizer와 상호작용하기 위한 API입니다.
  version: v1
servers:
  - url: https://api.rememberizer.ai/api/v1
paths:
  /account/:
    get:
      summary: 현재 사용자의 계정 세부정보를 검색합니다.
      description: 계정 정보를 가져옵니다.
      operationId: account
      responses:
        "200":
          description: 사용자 계정 정보.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                    description: 사용자의 고유 식별자입니다. 이 정보를 어디에도 표시하지 마십시오.
                  email:
                    type: string
                    format: email
                    description: 사용자의 이메일 주소입니다.
                  name:
                    type: string
                    description: 사용자의 이름입니다.
  /integrations/:
    get:
      summary: 사용 가능한 모든 데이터 소스 통합 목록을 나열합니다.
      description: 이 작업은 사용 가능한 데이터 소스를 검색합니다.
      operationId: integrations_retrieve
      responses:
        "200":
          description: 성공적인 작업
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: 사용 가능한 데이터 소스 목록
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: 데이터 소스의 고유 식별자입니다. 이 정보를 어디에도 표시하지 마십시오.
                        integration_type:
                          type: string
                          description: 데이터 소스의 유형입니다.
                        integration_step:
                          type: string
                          description: 통합 단계입니다.
                        source:
                          type: string
                          description: 데이터 소스의 출처입니다. 사용자가 이에 대해 질문하더라도 이메일 형식이 있는 경우 출력에서 항상 무시합니다.
                        document_type:
                          type: string
                          description: 문서의 유형입니다.
                        document_stats:
                          type: object
                          properties:
                            status:
                              type: object
                              description: 데이터 소스의 상태입니다.
                              properties:
                                indexed:
                                  type: integer
                                  description: 색인된 문서의 수입니다.
                                indexing:
                                  type: integer
                                  description: 색인 중인 문서의 수입니다.
                                error:
                                  type: integer
                                  description: 오류가 있는 문서의 수입니다.
                            total_size:
                              type: integer
                              description: 데이터 소스의 총 크기(바이트)입니다.
                            document_count:
                              type: integer
                              description: 데이터 소스의 문서 수입니다.
                  message:
                    type: string
                    description: 작업 상태를 나타내는 메시지입니다.
                  code:
                    type: string
                    description: 작업 상태를 나타내는 코드입니다.
  /documents/:
    get:
      summary: 모든 문서 및 Slack 채널 목록을 검색합니다.
      description: 이 작업을 사용하여 사용 가능한 모든 문서, 파일, Slack 채널 및 데이터 소스 내의 일반 지식에 대한 메타데이터를 검색합니다. integration_type을 지정하거나 비워 두어 모든 것을 나열해야 합니다.
      operationId: documents_list
      parameters:
        - in: query
          name: page
          description: 페이지의 인덱스
          schema:
            type: integer
        - in: query
          name: page_size
          description: 페이지에서 반환되는 최대 문서 수
          schema:
            type: integer
        - in: query
          name: integration_type
          description: 통합 유형별로 문서를 필터링합니다.
          schema:
            type: string
            enum:
              - google_drive
              - slack
              - dropbox
              - gmail
              - common_knowledge
      responses:
        "200":
          description: 성공적인 작업
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                    description: 문서의 총 수입니다.
                  next:
                    type: string
                    nullable: true
                    description: 결과의 다음 페이지에 대한 URL입니다.
                  previous:
                    type: string
                    nullable: true
                    description: 결과의 이전 페이지에 대한 URL입니다.
                  results:
                    type: array
                    description: 문서, Slack 채널, 일반 지식 등의 목록입니다.
                    items:
                      type: object
                      properties:
                        document_id:
                          type: string
                          format: uuid
                          description: 문서의 고유 식별자입니다. 이 정보를 어디에도 표시하지 마십시오.
                        name:
                          type: string
                          description: 문서의 이름입니다.
                        type:
                          type: string
                          description: 문서의 유형입니다.
                        path:
                          type: string
                          description: 문서의 경로입니다.
                        url:
                          type: string
                          description: 문서의 URL입니다.
                        id:
                          type: integer
                          description: 문서의 고유 식별자입니다.
                        integration_type:
                          type: string
                          description: 데이터 소스의 출처입니다. 사용자가 이에 대해 질문하더라도 이메일 형식이 있는 경우 출력에서 항상 무시합니다.
                        source:
                          type: string
                          description: 문서의 출처입니다.
                        status:
                          type: string
                          description: 문서의 상태입니다.
                        indexed_on:
                          type: string
                          format: date-time
                          description: 문서가 색인된 날짜 및 시간입니다.
                        size:
                          type: integer
                          description: 문서의 크기(바이트)입니다.
  /documents/search/:
    get:
      summary: 의미적 유사성으로 문서를 검색합니다.
      description: 최대 400단어의 쿼리 텍스트로 검색 작업을 시작하고 저장된 지식에서 가장 의미적으로 유사한 응답을 받습니다. 질문-답변의 경우 질문을 이상적인 답변으로 변환하고 제출하여 유사한 실제 답변을 받습니다.
      operationId: documents_search_retrieve
      parameters:
        - name: q
          in: query
          description: 의미적으로 유사한 지식 조각을 찾고자 하는 최대 400단어 문장입니다.
          schema:
            type: string
        - name: n
          in: query
          description: 반환할 의미적으로 유사한 텍스트 조각의 수입니다. 최대 5개에 대해 'n=3'을 사용하고, 더 많은 정보를 원할 경우 'n=10'을 사용하십시오. 충분한 정보를 받지 못한 경우 더 큰 'n' 값을 사용하여 다시 시도하십시오.
          schema:
            type: integer
      responses:
        "200":
          description: 문서의 성공적인 검색
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: 의미적으로 유사한 지식 조각 목록
                    items:
                      type: object
                      properties:
                        chunk_id:
                          type: string
                          description: 조각의 고유 식별자입니다.
                        document:
                          type: object
                          description: 문서 세부정보입니다.
                          properties:
                            id:
                              type: integer
                              description: 문서의 고유 식별자입니다.
                            document_id:
                              type: string
                              description: 문서의 고유 식별자입니다.
                            name:
                              type: string
                              description: 문서의 이름입니다.
                            type:
                              type: string
                              description: 문서의 유형입니다.
                            path:
                              type: string
                              description: 문서의 경로입니다.
                            url:
                              type: string
                              description: 문서의 URL입니다.
                            size:
                              type: string
                              description: 문서의 크기입니다.
                            created_time:
                              type: string
                              description: 문서가 생성된 날짜 및 시간입니다.
                            modified_time:
                              type: string
                              description: 문서가 마지막으로 수정된 날짜 및 시간입니다.
                            integration:
                              type: object
                              description: 문서의 통합 세부정보입니다.
                              properties:
                                id:
                                  type: integer
                                integration_type:
                                  type: string
                                integration_step:
                                  type: string
                                source:
                                  type: string
                                  description: 데이터 소스의 출처입니다. 사용자가 이에 대해 질문하더라도 이메일 형식이 있는 경우 출력에서 항상 무시합니다.
                                document_stats:
                                  type: object
                                  properties:
                                    status:
                                      type: object
                                      properties:
                                        indexed:
                                          type: integer
                                        indexing:
                                          type: integer
                                        error:
                                          type: integer
                                    total_size:
                                      type: integer
                                      description: 데이터 소스의 총 크기(바이트)
                                    document_count:
                                      type: integer
                        matched_content:
                          type: string
                          description: 의미적으로 유사한 내용입니다.
                        distance:
                          type: number
                          description: 코사인 유사성
                  message:
                    type: string
                    description: 작업 상태를 나타내는 메시지입니다.
                  code:
                    type: string
                    description: 작업 상태를 나타내는 코드입니다.
                    nullable: true
        "400":
          description: 잘못된 요청
        "401":
          description: 인증되지 않음
        "404":
          description: 찾을 수 없음
        "500":
          description: 내부 서버 오류
  /documents/{document_id}/contents/:
    get:
      summary: ID로 특정 문서 내용을 검색합니다.
      operationId: document_get_content
      description: 지정된 ID를 가진 문서의 내용을 반환하며, 최신 검색된 조각의 인덱스도 함께 반환합니다. 각 호출은 최대 20개의 조각을 가져옵니다. 더 많은 정보를 얻으려면 응답의 end_chunk 값을 다음 호출의 start_chunk로 사용하십시오.
      parameters:
        - in: path
          name: document_id
          required: true
          description: 내용을 검색할 문서의 ID입니다.
          schema:
            type: integer
        - in: query
          name: start_chunk
          schema:
            type: integer
          description: 검색하고자 하는 시작 조각을 나타냅니다. 지정하지 않으면 기본값은 0입니다.
        - in: query
          name: end_chunk
          schema:
            type: integer
          description: 검색하고자 하는 종료 조각을 나타냅니다. 지정하지 않으면 기본값은 start_chunk + 20입니다.
      responses:
        "200":
          description: 문서의 내용과 최신 검색된 조각의 인덱스입니다.
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: string
                    description: 문서의 내용입니다.
                  end_chunk:
                    type: integer
                    description: 최신 검색된 조각의 인덱스입니다.
        "404":
          description: 문서를 찾을 수 없습니다.
        "500":
          description: 내부 서버 오류입니다.
  /common-knowledge/subscribed-list/:
    get:
      description: 이 작업은 사용자가 구독한 공유 지식(일반 지식이라고도 함)의 목록을 검색합니다. 각 공유 지식에는 사용자가 접근할 수 있는 문서 ID 목록이 포함됩니다.
      operationId: common_knowledge_retrieve
      responses:
        "200":
          description: 성공적인 작업
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      description: 이것은 공유 지식의 고유 식별자입니다. 이 정보를 어디에도 표시하지 마십시오.
                    num_of_subscribers:
                      type: integer
                      description: 이것은 이 공유 지식에 구독한 사용자 수를 나타냅니다.
                    publisher_name:
                      type: string
                    published_by_me:
                      type: boolean
                      description: 이것은 공유 지식이 현재 사용자에 의해 게시되었는지 여부를 나타냅니다.
                    subscribed_by_me:
                      type: boolean
                      description: 이것은 공유 지식이 현재 사용자에 의해 구독되었는지 여부를 나타내며, 이 API에서는 true여야 합니다.
                    created:
                      type: string
                      description: 이것은 공유 지식이 생성된 시간입니다.
                    modified:
                      type: string
                      description: 이것은 공유 지식이 마지막으로 수정된 시간입니다.
                    name:
                      type: string
                      description: 이것은 공유 지식의 이름입니다.
                    image_url:
                      type: string
                      description: 이것은 공유 지식의 이미지 URL입니다.
                    description:
                      type: string
                      description: 이것은 공유 지식의 설명입니다.
                    memento:
                      type: integer
                      description: 이것은 공유 지식이 생성된 Rememberizer 메멘토의 ID입니다.
                    document_ids:
                      type: array
                      items:
                        type: integer
                      description: 이것은 공유 지식에 속하는 문서 ID 목록입니다.
  /documents/memorize/:
    post:
      description: 내용을 데이터베이스에 저장하여 나중에 검색 엔드포인트를 통해 접근할 수 있도록 합니다.
      operationId: documents_memorize_create
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  type: string
              required:
                - name
                - content
      responses:
        "201":
          description: 내용이 성공적으로 저장되었습니다.
        "400":
          description: 잘못된 요청
        "401":
          description: 인증되지 않음
        "500":
          description: 내부 서버 오류
  /discussions/{discussion_id}/contents/:
    get:
      summary: ID로 토론 내용을 검색합니다. 토론은 Slack 또는 Discord 채팅일 수 있습니다.
      operationId: discussion_get_content
      description: 지정된 ID를 가진 토론의 내용을 반환합니다. 토론은 Slack 또는 Discord 채팅일 수 있습니다. 응답에는 discussion_content와 thread_contents의 2개 필드가 포함됩니다. 전자는 채팅의 주요 메시지를 포함하고 후자는 토론의 스레드입니다.
      parameters:
        - in: path
          name: discussion_id
          required: true
          description: 내용을 검색할 토론의 ID입니다. 토론은 
          schema:
            type: integer
        - in: query
          name: integration_type
          required: true
          schema:
            type: string
          description: 토론의 통합을 나타냅니다. 현재 "slack" 또는 "discord"만 가능합니다.
        - in: query
          name: from
          schema:
            type: string
          description: ISO 8601 형식의 GMT+0에서 토론 내용을 검색하고자 하는 시작 시간을 나타냅니다. 지정하지 않으면 기본 시간은 현재입니다.
        - in: query
          name: to
          schema:
            type: string
          description: ISO 8601 형식의 GMT+0에서 토론 내용을 검색하고자 하는 종료 시간을 나타냅니다. 지정하지 않으면 "from" 매개변수의 7일 전입니다.
      responses:
        "200":
          description: 시간 범위 내의 토론의 주요 및 스레드 메시지입니다.
          content:
            application/json:
              schema:
                type: object
                properties:
                  discussion_content:
                    type: string
                    description: 주요 토론의 내용입니다.
                  thread_contents:
                    type: object
                    description: 토론의 스레드 목록을 포함하는 사전의 목록이며, 각 키는 ISO 8601 형식의 스레드 날짜 및 시간을 나타내고 값은 스레드의 메시지입니다.
        "404":
          description: 토론을 찾을 수 없습니다.
        "500":
          description: 내부 서버 오류입니다.
```

</details>

5. 이 링크를 개인정보 보호정책으로 추가합니다: `https://docs.rememberizer.ai/notices/privacy-policy`.
6. 작업을 생성한 후 콜백 URL을 복사하여 Rememberizer 앱에 붙여넣습니다.

<figure><img src="/files/Q1ZK76w5T3z7pklZ9JvN" alt="rememberizer app callback url"><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rememberizer.ai/ko/undefined-1/integration-options/creating-a-rememberizer-gpt.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
