Anthropic: Chat AI 작업

Anthropic Chat AI action connects automations to Amazon Bedrock Anthropic chat AI functionality. This action enables automations to engage in natural, informative, and context-aware conversations with users, providing a more personalized and engaging automation experience.

전제 조건

  • You must have the Bot creator role to use the Anthropic Chat AI action in a bot.
  • Ensure that you have the necessary credentials to send a request. For more information on acquiring the credentials, see 인증 작업.

This example shows how to send a natural language message using the Anthropic Chat AI action and get an appropriate response.

프로시저

  1. In the Control Room, navigate to the Actions pane, select Generative AI > Amazon Bedrock, drag Anthropic: Chat AI and place it in the canvas.
  2. Enter or select the following fields:

    Anthropic Chat AI

    1. Enter the Region. For information on Region, see Amazon Bedrock GA regions.
    2. Select a large language model (LLM) to use for your prompt from the Model dropdown. You can select the following models:
      • Claude Instant v1.2
      • Claude v1.3
      • Claude v2
      • Claude v2.1
      • Other supported version to input other supported models.
    3. Enter a chat Message to use by the model to generate a response.
      주: 채팅 작업은 동일한 세션 내에서 이전 채팅 작업의 결과를 유지합니다. 채팅 작업을 연속적으로 호출하면 모델이 후속 메시지를 이해하고 이전 메시지와 연관시킬 수 있습니다. 그러나 세션이 종료되면 모든 채팅 기록이 삭제됩니다.
    4. Enter the Maximum length.
      By default, if you do not enter a value, then the maximum length is automatically set to keep it within the maximum context length of the selected model by considering the length of the generated response.
    5. Enter a Temperature. This value refers to the randomness of the response. As the temperature approaches zero, the response becomes specific. The higher the value, the more random is the response.
    6. Enter Default as the session name to limit the session to the current session.
    7. To manage the optional parameters, click Show more options and select Yes. If you select Yes, you can add other parameters such as: Top P, Top K, Add instructions, Stop sequences, or enter an Anthropic version. For information about these optional parameters, see Learn Models.
    8. Save the response to a variable..
      In this example, the response is saved to str_Anthropic_chatResponse
  3. Click Run to start the Bot.
    You can read the value of the field by printing the response in a Message box 작업. In this example, str_Anthropic_chatResponse prints the response. You can add additional chat requests to get additional responses.
    팁: 동일한 Bot에서 여러 개의 채팅을 유지하려면, 서로 다른 이름이나 변수를 사용하여 여러 세션을 만들어야 합니다.