Give an agent a soft profile of likes and dislikes and take the must-haves off the form (wp-likes)
Add agents.like_text (migration 30) beside avoid_text, now shown as "What I don't like". The judge reads both under <likes> and <dislikes>, its career rubric judges against the prompts, the likes and the dislikes, and FORMAT 3 makes earlier judgements be made again. The form drops the must-haves box and no longer sends must_text, so a stored one is kept and still caps career in code. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
82afa831f2
commit
8c6cbdf002
18 files changed
+144
-75
No files matched your search
+10
-6
@@ -2093,13 +2093,14 @@ class Store:
|
||||
cv_text: str | None = None,
|
||||
cv_languages: Sequence[CvLanguage] | None = None,
|
||||
avoid_text: str | None = None,
|
||||
must_text: str | None = None) -> Agent:
|
||||
must_text: str | None = None,
|
||||
like_text: str | None = None) -> Agent:
|
||||
"""Create an agent, or with `agent_id` replace that one's fields and
|
||||
prompts. Without `prompts`, a non-empty `intent` is its one prompt,
|
||||
named after the agent. Without `fetch_terms` an update keeps the
|
||||
stored ones and a new agent has none, so a caller that does not know
|
||||
them (the CLI's prompt edit) loses none; `cv_text`, `cv_languages`,
|
||||
`avoid_text` and `must_text` are kept the same way. A prompt whose text is
|
||||
`like_text`, `avoid_text` and `must_text` are kept the same way. A prompt whose text is
|
||||
unchanged keeps its cached vector, whatever its name or place, so an
|
||||
edit re-embeds only the prompts it changed. A save gives every role
|
||||
`judge` gave up on for the agent its tries back, since what it is
|
||||
@@ -2120,16 +2121,18 @@ class Store:
|
||||
(limits or Limits()).model_dump_json(), int(enabled), terms,
|
||||
None if cv_text is None else cv_text.strip(), spoken,
|
||||
None if avoid_text is None else avoid_text.strip(),
|
||||
None if must_text is None else must_text.strip())
|
||||
None if must_text is None else must_text.strip(),
|
||||
None if like_text is None else like_text.strip())
|
||||
try:
|
||||
with self.transaction() as conn:
|
||||
if agent_id is None:
|
||||
agent_id = conn.execute(
|
||||
"""INSERT INTO agents (name, gates, weights, limits, enabled,
|
||||
fetch_terms, cv_text, cv_languages, avoid_text,
|
||||
must_text, created_at)
|
||||
must_text, like_text, created_at)
|
||||
VALUES (?,?,?,?,?,COALESCE(?, '[]'),COALESCE(?, ''),
|
||||
COALESCE(?, '[]'),COALESCE(?, ''),COALESCE(?, ''),?)""",
|
||||
COALESCE(?, '[]'),COALESCE(?, ''),COALESCE(?, ''),
|
||||
COALESCE(?, ''),?)""",
|
||||
(*fields, self.now())).lastrowid
|
||||
elif not conn.execute(
|
||||
"""UPDATE agents SET name=?, gates=?, weights=?, limits=?, enabled=?,
|
||||
@@ -2137,7 +2140,8 @@ class Store:
|
||||
cv_text=COALESCE(?, cv_text),
|
||||
cv_languages=COALESCE(?, cv_languages),
|
||||
avoid_text=COALESCE(?, avoid_text),
|
||||
must_text=COALESCE(?, must_text)
|
||||
must_text=COALESCE(?, must_text),
|
||||
like_text=COALESCE(?, like_text)
|
||||
WHERE id=?""",
|
||||
(*fields, agent_id)).rowcount:
|
||||
raise KeyError(agent_id)
|
||||
|
||||
Reference in new issue
Block a user