본문 바로가기
WIKI 기술 지식 베이스

Update Agent API

원문 보기 위키 갱신

출처: 문서

본문

에이전트 업데이트 API

3.1에 도입됨 {: .label .label-purple }

이 API를 사용하면 기존 에이전트의 구성을 업데이트할 수 있어요.

엔드포인트

PUT /_plugins/_ml/agents/{agent_id}

경로 파라미터

다음 표에서 사용 가능한 경로 파라미터를 확인할 수 있어요.

파라미터 데이터 타입 설명
agent_id String 업데이트할 에이전트의 에이전트 ID예요.

요청 본문 필드

다음 표에서 사용 가능한 요청 필드를 확인할 수 있어요. 모든 요청 본문 필드는 선택 사항이에요.

필드 데이터 타입 에이전트 타입 설명
name String 모두 에이전트 이름이에요.
description String 모두 에이전트에 대한 설명이에요.
tools Array 모두 에이전트가 실행할 도구 목록이에요.
app_type String 모두 선택 사항인 에이전트 카테고리를 지정해요.
memory.type String conversational_flow, conversational 대화 메모리를 저장할 위치를 지정해요. 지원되는 유형은 conversation_index(대화형 시스템 인덱스에 메모리를 저장하는 방식)뿐이에요.
llm.model_id String conversational 질문을 보낼 대규모 언어 모델(LLM)의 모델 ID예요.
llm.parameters.response_filter String conversational LLM 응답을 파싱하기 위한 패턴이에요.
llm.parameters.max_iteration Integer conversational LLM에 보낼 수 있는 메시지의 최대 개수예요.

예제 요청: 도구 프롬프트 업데이트

PUT /_plugins/_ml/agents/N8AE1osB0jLkkocYjz7D
{
  "name": "Updated_Test_Agent_For_RAG",
  "description": "Updated description for test agent",
  "tools": [
    {
      "type": "MLModelTool",
      "description": "Updated general tool to answer any question",
      "parameters": {
        "model_id": "NWR9YIsBUysqmzBdifVJ",
        "prompt": "This is an updated prompt"
      }
    }
  ]
}

{% include copy-curl.html %}

예제 응답

{
    "_index": ".plugins-ml-agent",
    "_id": "ryN5jpcBfY4uTYhorKvh",
    "_version": 2,
    "result": "updated",
    "_shards": {
        "total": 1,
        "successful": 1,
        "failed": 0
    },
    "_seq_no": 1,
    "_primary_term": 1
}

더 알아보기 (Learn more)