

지원 종료 공지: 2025년 9월 15 AWS 일에는 Amazon Lex V1에 대한 지원을 중단할 예정입니다. 2025년 9월 15일 이후에는 Amazon Lex V1 콘솔 또는 Amazon Lex V1 리소스에 더 이상 액세스할 수 없습니다. Amazon Lex V2를 사용하는 경우 대신 [Amazon Lex V2 가이드를](https://docs.aws.amazon.com/lexv2/latest/dg/what-is.html) 참조하세요.

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# 텍스트 입력을 사용하여 봇 테스트(AWS CLI)
<a name="gs-create-test-text"></a>

 봇이 텍스트 입력에 올바르게 작동하는지 확인하려면 [PostText](API_runtime_PostText.md) 작업을 사용합니다. 이 연습에서 명령을 실행하려면 명령이 실행될 리전을 알아야 합니다. 리전 목록은 [런타임 서비스 할당량](gl-limits.md#gl-limits-runtime)을 참조하십시오.

**참고**  
다음 AWS CLI 예제는 Unix, Linux 및 macOS용으로 포맷되어 있습니다. Windows의 경우 `"\$LATEST"`를 `$LATEST`로 바꾸고, 각 줄의 끝에 있는 백슬래시(\$1) 연속 문자를 캐럿(^)으로 변경합니다.

**텍스트를 사용하여 봇을 테스트하려면(AWS CLI)**

1. 에서 `OrderFlowersBot` 봇과의 대화를 AWS CLI시작합니다. 다음은 Unix, Linux, macOS용 형식으로 지정된 예제입니다. Windows의 경우 각 줄의 끝에 있는 백슬래시(\$1) Unix 연속 문자를 캐럿(^)으로 바꿉니다.

   ```
   aws lex-runtime post-text \
       --region region \
       --bot-name OrderFlowersBot \
       --bot-alias "\$LATEST" \
       --user-id UserOne \
       --input-text "i would like to order flowers"
   ```

   Amazon Lex는 사용자의 의도를 인식하고 다음 응답을 반환하여 대화를 시작합니다.

   ```
   {
       "slotToElicit": "FlowerType", 
       "slots": {
           "PickupDate": null, 
           "PickupTime": null, 
           "FlowerType": null
       }, 
       "dialogState": "ElicitSlot", 
       "message": "What type of flowers would you like to order?", 
       "intentName": "OrderFlowers"
   }
   ```

1. 다음 명령을 실행하여 봇과의 대화를 종료합니다.

   ```
   aws lex-runtime post-text \
       --region region \
       --bot-name OrderFlowersBot \
       --bot-alias "\$LATEST" \
       --user-id UserOne \
       --input-text "roses"
   ```

   ```
   aws lex-runtime post-text  \
       --region region \
       --bot-name OrderFlowersBot \
       --bot-alias "\$LATEST" \
       --user-id UserOne \
       --input-text "tuesday"
   ```

   ```
   aws lex-runtime post-text  \
       --region region \
       --bot-name OrderFlowersBot --bot-alias "\$LATEST" \
       --user-id UserOne \
       --input-text "10:00 a.m."
   ```

   ```
   aws lex-runtime post-text  \
       --region region \
       --bot-name OrderFlowersBot \
       --bot-alias "\$LATEST" \
       --user-id UserOne \
       --input-text "yes"
   ```

    주문을 확인하면 Amazon Lex는 이행 응답을 보내 대화를 완료합니다.

   ```
   {
       "slots": {
           "PickupDate": "2017-05-16", 
           "PickupTime": "10:00", 
           "FlowerType": "roses"
       }, 
       "dialogState": "ReadyForFulfillment", 
       "intentName": "OrderFlowers"
   }
   ```

## 다음 단계
<a name="gs-create-next-test"></a>

[음성 입력을 사용하여 봇 테스트(AWS CLI)](gs-create-test-speech.md)