Rememberizer GPT 생성

이 튜토리얼에서는 Rememberizer 앱을 만드는 방법과 OpenAI GPT와 연결하는 방법을 배우게 됩니다. 이를 통해 GPT는 Rememberizer API 기능에 접근할 수 있습니다.

사전 준비 사항

먼저, Rememberizer 앱을 등록하고 적절한 설정으로 구성해야 합니다.

GPT를 만들려면 Rememberizer 앱의 Authorized 요청 원본을 https://chat.openai.com으로 설정해야 합니다.

앱을 등록하기 위해 콜백 URL을 추가해야 하지만, 이 콜백 URL은 GPT에 동작을 추가한 후에만 찾을 수 있습니다. 지금은 가짜 값(e.g. https://chat.openai.com)으로 두십시오. 콜백 URL을 얻게 되면, 앱의 적절한 값을 업데이트해야 합니다. 참고: GPT는 구성을 변경한 후 콜백 URL을 업데이트합니다. 최신 콜백 URL을 꼭 복사해두세요.

앱을 만들고 나면 Client IDClient Secret을 복사합니다. 이것들은 GPT를 만들 때 사용됩니다.

GPT 생성

ChatGPT UI에서 GPT를 생성하는 것으로 시작할 수 있습니다.

GPT 구성

알맞게 정보를 채우실 수 있습니다. 다음은 시도해볼 수 있는 예시입니다:

필드예시 값

이름

Rememberizer

설명

Google 드라이브와 Slack 채널에 있는 모든 pdf, 문서, 표, 슬라이드로 직접 대화할 수 있습니다.

사용설명

Rememberizer는 사용자가 Google 드라이브와 Slack 같은 여러 출처에서 데이터를 효율적으로 쿼리할 수 있도록 Rememberizer 도구와 원활하게 상호 작용할 수 있도록 설계되었습니다. 주 목표는 사용자의 데이터에 빠르고 정확하게 접근할 수 있도록 Rememberizer의 기능을 활용하여 검색 속도와 정확성을 최적화하는 것입니다. GPT는 사용자가 쿼리를 구성하고 결과를 해석하는 데 도움을 주어야 하며, 사용자 친화적인 경험을 보장해야 합니다. 응답에서 명료성과 정확성을 유지하는 것은 특히 데이터 검색 및 분석을 처리할 때 중요합니다. GPT는 간단한 데이터 조회부터 여러 매개변수 또는 출처가 관련된 더 복잡한 검색에 이르기까지 다양한 쿼리를 처리할 수 있어야 합니다. 중점은 사용자가 필요한 정보에 빠르고 효과적으로 접근할 수 있는 능력을 향상시키는 것으로, 이 과정을 가능한 한 쉽게 만드는 것입니다.

리멤버라이저 행동 생성

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/

    • 범위를 비워 둡니다.

    • 저장 클릭.

  4. 리멤버라이저의 OpenAPI 사양을 작성합니다. 아래의 확장 가능한 내용 복사하여 스키마 필드에 붙여넣습니다:

Rememberizer_OpenAPI.yaml
openapi: 3.0.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 채널에 대한 메타데이터를 검색합니다.
      operationId: documents_list_file_and_channel
      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, 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
                                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: 권한 없음
        "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: 이는 공유 지식이 생성된 리멤버라이저 메멘토의 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:
                name:
                  type: string
                content:
                  type: string
              required:
                - name
                - content
      responses:
        "201":
          description: 내용이 성공적으로 저장되었습니다.
        "400":
          description: 잘못된 요청
        "401":
          description: 권한 없음
        "500":
          description: 내부 서버 오류
  1. 이 링크를 개인정보 보호 정책으로 추가합니다: https://docs.rememberizer.ai/notices/privacy-policy.

  2. 작업을 생성한 후 콜백 URL을 복사하고 리멤버라이저 앱에 붙여넣습니다.

Last updated