diff --git a/src/uipath_langchain/agent/react/types.py b/src/uipath_langchain/agent/react/types.py index 68d794b11..028a16a03 100644 --- a/src/uipath_langchain/agent/react/types.py +++ b/src/uipath_langchain/agent/react/types.py @@ -81,19 +81,15 @@ class MemoryConfig(BaseModel): # Defaults match FE episodic memory settings (agentEditor.ts:324-328) result_count: int = Field(default=3, ge=1, le=10) threshold: float = Field(default=0.0, ge=0.0, le=1.0) - field_weights: dict[str, float] = Field( + field_weights: dict[str, float] | None = Field( + default=None, description=( "Per-field search weights. Keys are input field names, values are " - "weights between 0.0 and 1.0. At least one field must be specified." + "weights between 0.0 and 1.0. When None, all input fields are " + "searched with default weights." ), ) - @model_validator(mode="after") - def _validate_field_weights(self) -> "MemoryConfig": - if not self.field_weights: - raise ValueError("field_weights must contain at least one field") - return self - class AgentGraphConfig(BaseModel): llm_messages_limit: int = Field(