Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions src/uipath_langchain/agent/react/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Loading