Extract and summarise bounds are each agent's own limits, set on its form
agents.limits holds extract_top, extract_min, summarise_top and summarise_min; the scope query reads them per ranked row, and a row saved before this behaves like a fresh agent. The four global config keys go. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
e602eb3388
commit
cebe62ddc9
20 files changed
+229
-147
No files matched your search
+4
-3
@@ -16,8 +16,8 @@ from pydantic import BaseModel, Field
|
||||
|
||||
from app import jobs
|
||||
from app.models import (
|
||||
AFFINITY, Agent, Application, Company, Gate, Role, ScoredRole, Status, Subscription,
|
||||
Weights, company_key,
|
||||
AFFINITY, Agent, Application, Company, Gate, Limits, Role, ScoredRole, Status,
|
||||
Subscription, Weights, company_key,
|
||||
)
|
||||
from app.storage import Store
|
||||
from app.web.deps import ConfigDep, StoreDep
|
||||
@@ -538,6 +538,7 @@ class AgentBody(BaseModel):
|
||||
intent: str = ""
|
||||
gates: list[Gate] = []
|
||||
weights: Weights = Weights()
|
||||
limits: Limits = Limits()
|
||||
enabled: bool = True
|
||||
|
||||
|
||||
@@ -547,7 +548,7 @@ def save_agent(body: AgentBody, store: StoreDep) -> Agent:
|
||||
page starts after a save."""
|
||||
try:
|
||||
return store.save_agent(body.name, body.intent, body.gates, body.weights,
|
||||
body.enabled, agent_id=body.id)
|
||||
body.enabled, agent_id=body.id, limits=body.limits)
|
||||
except ValueError as exc:
|
||||
raise HTTPException(409, str(exc)) from exc
|
||||
except KeyError:
|
||||
|
||||
Reference in new issue
Block a user