# External Pipeline

## Overview

<figure><img src="https://1470748636-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDY50EL4OmcrPvtoecg4h%2Fuploads%2FKu3BcBBquyQzBbdZoMEt%2Fexternal-pipeline-diagram.png?alt=media&#x26;token=0feff6d1-4423-4525-a3f7-b296841b1bb3" alt=""><figcaption></figcaption></figure>

### Quick Guide - End to End

Let's create your first external pipeline in under 5 minutes.

> **⚠️** Disclaimer: This guide is specifically for running the service and register it to GLChat. The server is not intended for use in production.

### Step 1: Download and Running Your Service

To get started, download `external-pipeline-example.zip`&#x20;

{% file src="<https://1470748636-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDY50EL4OmcrPvtoecg4h%2Fuploads%2Fy0Ab24bS01hjVbSKwYnK%2Fexternal-pipeline-example.zip?alt=media&token=93f6a9e7-8362-44a7-833c-e8ca8ab9f5de>" %}

After you download it, you can follow the instructions (`README.md`) inside the downloaded folder.

Follow until you successfully run your server

<figure><img src="https://1470748636-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDY50EL4OmcrPvtoecg4h%2Fuploads%2FBys26pJvSD8ujRxIXEZ1%2Fimage.png?alt=media&#x26;token=ef55484f-dc63-4860-97f7-cdbd1c187c4b" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
In this example I set env to:

* SERVER\_NAME = RAG Pipeline Attachment Support Example
* SERVER\_PORT = 8006
* SERVER\_NAME = Example Guide RAG External Pipeline
* SERVER\_VERSION = 1.0.0
* SERVER\_DESCRIPTION = Complete RAG pipeline example for GLChat external pipeline integration
* MODEL\_NAMES = rag-pipeline,gpt-4o-mini
* SUPPORTS\_ATTACHMENTS = true
* SUPPORTED\_FILE\_TYPES = '{"document": \[".pdf", ".txt", ".md", ".docx"], "image": \[".jpg", ".png", ".jpeg"], "audio": \[".mp3", ".wav"]}'
* MAX\_FILE\_SIZE = 10485760
* MAX\_FILE\_COUNT = 5
  {% endhint %}

### Step 2: Register Your Pipeline in GLChat

This step will guide you to register your pipeline in GLChat

1. Open GLChat

2. Open Admin Dashboard

3. Go to RAGO Pipelines inside Pipeline & Preset<br>

   <figure><img src="https://1470748636-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDY50EL4OmcrPvtoecg4h%2Fuploads%2F9ob5A0he0Z6ein67Ztso%2Fimage.png?alt=media&#x26;token=d2103abf-e909-4eb8-8f71-c613d3631795" alt=""><figcaption></figcaption></figure>

4. Click Register External Pipeline<br>

   <figure><img src="https://1470748636-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDY50EL4OmcrPvtoecg4h%2Fuploads%2FVuXuxn2MJZD9cI9zUH83%2Fimage.png?alt=media&#x26;token=5cdf399c-6651-410a-80f8-dc64e194ddd2" alt=""><figcaption></figcaption></figure>

5. Insert your url and api key service (from the step 1) and click save<br>

   <figure><img src="https://1470748636-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDY50EL4OmcrPvtoecg4h%2Fuploads%2FtbgrNcts7TNLRPhYrBkp%2Fimage.png?alt=media&#x26;token=96be3133-c178-482b-b5dd-adfc73d52160" alt=""><figcaption></figcaption></figure>

6. Then your pipeline service is created here<br>

   <figure><img src="https://1470748636-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDY50EL4OmcrPvtoecg4h%2Fuploads%2F0aQguWPCfKp1gOxXpBKP%2Fimage.png?alt=media&#x26;token=4cd35906-2d9b-4650-96c6-d27fb471d85d" alt=""><figcaption></figcaption></figure>

### Step 3: Interact With Your Service

To interact with your service, you need to create your application and use your pipeline service as your RAG Pipeline.

1. Create your application (new application) from Application page<br>

   <figure><img src="https://1470748636-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDY50EL4OmcrPvtoecg4h%2Fuploads%2F8TUF7b96TOtNnCNTLyBF%2Fimage.png?alt=media&#x26;token=de789254-99e9-4f75-b922-9f840e009439" alt=""><figcaption></figcaption></figure>

2. Fill required fields

3. The one you need to change is RAG Pipeline field. Set it to your newly created pipeline service<br>

   <figure><img src="https://1470748636-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDY50EL4OmcrPvtoecg4h%2Fuploads%2FXZMKTFqaxKQ6q944HW7W%2Fimage.png?alt=media&#x26;token=2623da33-e653-43cf-836c-243a48dccf00" alt=""><figcaption></figcaption></figure>

4. Click next and save until your application created

5. Go back to your Application

6. You can now select your newly created application<br>

   <figure><img src="https://1470748636-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDY50EL4OmcrPvtoecg4h%2Fuploads%2FhxI8dzdUkkBAugBEbZaK%2Fimage.png?alt=media&#x26;token=7cbbebb1-7278-4947-a437-e9d96899e507" alt=""><figcaption></figcaption></figure>

7. If you follow the step 1, the service can answer your question with the context from knowledge base

8. Try chat yourself!<br>

   <figure><img src="https://1470748636-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDY50EL4OmcrPvtoecg4h%2Fuploads%2Fr8gRPP4C69U7x08VubxN%2Fimage.png?alt=media&#x26;token=c4884ca8-35f0-4227-8abc-eb3286dd6143" alt=""><figcaption></figcaption></figure>

9. If you using the external pipeline server from Step 1, it can also handle Attachment and Web Search\ <br>

   <figure><img src="https://1470748636-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDY50EL4OmcrPvtoecg4h%2Fuploads%2FrowNsN1EhrCTbQVS14bx%2Fimage.png?alt=media&#x26;token=69d6ec0a-111f-4db3-9107-c799e583e51a" alt=""><figcaption></figcaption></figure>

Next section will have more detailed on how you can implement your external pipeline service.
