跳转至

编排器 API

LangGraph-based orchestrator for switching between AI and human responses.

__init__

__init__(
    *,
    model_name=None,
    model_provider=None,
    model_temperature=None,
    system_prompt=None,
    fallback_response=None,
)

Initialize the orchestrator.

参数:

名称 类型 描述 默认
model_name str | None

Optional model name override.

None
model_provider str | None

Optional provider override.

None
model_temperature float | None

Optional temperature override.

None
system_prompt str | None

Optional system prompt.

None
fallback_response str | None

Optional fallback response override.

None

返回:

类型 描述
None

None.

引发:

类型 描述
Exception

Propagates unexpected initialization failures.

run

run(orchestrator_input)

Run a single orchestration step.

参数:

名称 类型 描述 默认
orchestrator_input OrchestratorInput

Input payload.

必需

返回:

名称 类型 描述
OrchestratorResult OrchestratorResult

Orchestration output.

引发:

类型 描述
Exception

Propagates unexpected failures from LangGraph execution.

Bases: BaseModel

Input payload for the orchestrator.

属性:

名称 类型 描述
session_id str

Session identifier.

current_status SessionStatus

Current session status.

incoming_role str

Role of the inbound message.

incoming_content str

Content of the inbound message.

event_name Optional[OrchestratorEvent]

Optional event to apply.

agent_id Optional[str]

Agent ID for knowledge filtering in RAG retrieval.

Bases: BaseModel

Output payload after orchestration.

属性:

名称 类型 描述
next_status SessionStatus

Status after processing the event.

response_role Optional[str]

Role of the generated response.

response_content Optional[str]

Content of the generated response.

agent_id Optional[str]

Agent ID used for this orchestration.

Bases: str, Enum

Represents the active responder for a session.

Bases: str, Enum

Represents events that can update the orchestration flow.