# 멀티턴 워크플로우 만들기 (Agentflow 3.0.0)

> 이 페이지는 Agentflow 3.0.0 버전으로 멀티턴 채팅 워크플로우를 구성하는 방법에 대해 설명합니다.

멀티턴 워크플로우 동영상 \[[바로가기](https://youtu.be/DZXOzUi0iR4)]

## [**1. 워크플로우 생성**](/default/v1.7.5.1/basic-tutorials/guides/workflow/openapi.md#id-1)

## **2. 워크플로우 편집**

### **2.1 리비전 정보 설정**

* **리비전 정보** 탭을 클릭합니다.
* **도커 이미지**, **인스턴스 타입**, **복제본** 등을 설정합니다. 이는 워크플로우가 실행될 환경을 결정합니다.
  * **도커 이미지**: 워크플로우 실행에 필요한 환경과 라이브러리가 포함된 컨테이너 이미지를 선택합니다.
  * **인스턴스 타입**: 워크플로우 실행에 할당할 컴퓨팅 리소스(CPU, 메모리)를 선택합니다.
  * **복제본**: 워크플로우를 실행할 인스턴스의 개수를 설정합니다. 복제본 수를 늘리면 병렬 처리 및 부하 분산이 가능합니다.
  * **GPU 할당량** (선택사항): GPU가 필요한 워크플로우의 경우 GPU 리소스를 할당할 수 있습니다.
  * **최대 큐 크기** (선택사항): 동시에 대기할 수 있는 최대 요청 수를 설정합니다.
  * **최대 동시 실행 수** (선택사항): 동시에 실행할 수 있는 최대 워크플로우 인스턴스 수를 제한합니다.
  * **환경 변수** (선택사항): 워크플로우 실행 시 필요한 환경 변수를 키-값 쌍으로 설정할 수 있습니다.
  * 도커 이미지 : `llmops-workflow-api:latest`
  * 인스턴스 타입: `micro (0.2 CPU Core, 500 Mb Memory)`
  * 복제본: `1`

<figure><img src="/files/HrWBZwSdDQsIngS12itq" alt="워크플로우 리비전 정보 설정 화면"><figcaption><p>워크플로우 리비전 정보 설정 화면</p></figcaption></figure>

### [**2.2 Flow 생성**](https://genos-docs.gitbook.io/default/v1.7.5.1/basic-tutorials/guides/workflow/pages/ufudxuRypv2slLmt6Y9R#id-2.2)

### **2.3 세부 설정**

**Flowise 창**에서 세부 설정을 조정합니다. 이번엔 멀티턴 노드 구성에 대해서 설명합니다.

* **전체 워크플로우:**

  Start 노드와 LLM 노드를 가져온 다음, 두 노드를 연결해줍니다.

  Start노드의 오른쪽에 마우스 hover시 나오는 화살표를 끌어 LLM 노드 왼편에 붙여줍니다.

  <figure><img src="/files/4jgvLWBdGIA79JPxIsDg" alt=""><figcaption></figcaption></figure>
* **Start 노드:** 워크플로우의 진입점이 되는 노드입니다. 멀티턴 채팅을 진행할 워크플로우이므로, Chat Input타입으로 지정해줍니다.

  <figure><img src="/files/iJ0FN2zBamas4ZI6EBDr" alt=""><figcaption></figcaption></figure>
* **LLM 노드:**
  * Model : ChatMnc

    사용할 LLM(Large Language Model)을 선택합니다. 이 모델은 워크플로우에서 텍스트 생성에 사용됩니다.

    <figure><img src="/files/vFsPpdA9hg4Bk3x7lqCG" alt=""><figcaption></figcaption></figure>
  * Enable Memory : 활성화

    * Memory Type : Window Size
    * Window Size : 4

    멀티턴을 위해 대화의 일부분을 저장하여 지원하는 메모리 구조입니다. ‘Window Size’ 값을 통하여 가장 최근의 **2N**개의 대화를 유지할 수 있습니다.

    <figure><img src="/files/t7kFgZ65TOYuiCXu3VGP" alt=""><figcaption></figcaption></figure>

    예를 들어, Window Size를 4로 지정했을 때, 총 8개의 질의/답변이 아래와 같이 쌓입니다 :

    <figure><img src="/files/pCx3AFI1mizBxNBnMHDK" alt=""><figcaption></figcaption></figure>

### [**2.4 저장**](https://genos-docs.gitbook.io/default/v1.7.5.1/basic-tutorials/guides/workflow/pages/RPizEdzx8v8D2KO2L4p1#id-2.3)

## [**3. 워크플로우 배포**](/default/v1.7.5.1/basic-tutorials/guides/workflow/openapi.md#id-3)

## **4. 결과**

<figure><img src="/files/IG5ILtoj4fF3DCSwW0wi" alt=""><figcaption></figcaption></figure>

* flow의 오른쪽 상단의 메세지 아이콘을 클릭하면, 해당 워크플로우를 테스트 해볼 수 있습니다.

<figure><img src="/files/9O7ggWSGNk3RFRlAROBf" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/qfHLbHET8CTcXk9uUx4r" alt=""><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://genos-docs.gitbook.io/default/v1.7.5.1/basic-tutorials/guides/workflow/agentflow3-3-multiturn.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.
