atlasbot: speed up fast mode
This commit is contained in:
parent
2d90005076
commit
2af817b9db
@ -16,7 +16,7 @@ spec:
|
||||
labels:
|
||||
app: atlasbot
|
||||
annotations:
|
||||
checksum/atlasbot-configmap: manual-atlasbot-83
|
||||
checksum/atlasbot-configmap: manual-atlasbot-84
|
||||
vault.hashicorp.com/agent-inject: "true"
|
||||
vault.hashicorp.com/role: "comms"
|
||||
vault.hashicorp.com/agent-inject-secret-turn-secret: "kv/data/atlas/comms/turn-shared-secret"
|
||||
|
||||
@ -3201,28 +3201,37 @@ def _open_ended_multi(
|
||||
state: ThoughtState | None = None,
|
||||
) -> str:
|
||||
model = _model_for_mode(mode)
|
||||
angle_count = 2 if mode == "fast" else 4
|
||||
insight_count = 2 if mode == "fast" else 4
|
||||
total_steps = 2 + angle_count + 2 + (1 if mode == "deep" else 0)
|
||||
if mode == "fast":
|
||||
angle_count = 1
|
||||
insight_count = 1
|
||||
total_steps = 2
|
||||
else:
|
||||
angle_count = 4
|
||||
insight_count = 4
|
||||
total_steps = 2 + angle_count + 2 + 1
|
||||
if state:
|
||||
state.total_steps = total_steps
|
||||
angles = _open_ended_plan(
|
||||
prompt,
|
||||
fact_pack=fact_pack,
|
||||
history_lines=history_lines,
|
||||
count=angle_count,
|
||||
state=state,
|
||||
model=model,
|
||||
)
|
||||
insights = _open_ended_insights(
|
||||
prompt,
|
||||
fact_pack=fact_pack,
|
||||
fact_meta=fact_meta,
|
||||
history_lines=history_lines,
|
||||
count=insight_count,
|
||||
state=state,
|
||||
model=model,
|
||||
)
|
||||
|
||||
angles: list[dict[str, Any]] = []
|
||||
insights: list[dict[str, Any]] = []
|
||||
if mode != "fast":
|
||||
angles = _open_ended_plan(
|
||||
prompt,
|
||||
fact_pack=fact_pack,
|
||||
history_lines=history_lines,
|
||||
count=angle_count,
|
||||
state=state,
|
||||
model=model,
|
||||
)
|
||||
insights = _open_ended_insights(
|
||||
prompt,
|
||||
fact_pack=fact_pack,
|
||||
fact_meta=fact_meta,
|
||||
history_lines=history_lines,
|
||||
count=insight_count,
|
||||
state=state,
|
||||
model=model,
|
||||
)
|
||||
seeds = _seed_insights(fact_lines, fact_meta, limit=max(4, insight_count))
|
||||
insight_candidates = insights + seeds
|
||||
subjective = _is_subjective_query(prompt)
|
||||
@ -3261,7 +3270,7 @@ def _open_ended_multi(
|
||||
)
|
||||
|
||||
candidates: list[dict[str, Any]] = []
|
||||
step = 3
|
||||
step = 1 if mode == "fast" else 3
|
||||
for angle in angle_inputs[:angle_count]:
|
||||
candidates.append(
|
||||
_open_ended_candidate(
|
||||
@ -3308,8 +3317,10 @@ def _open_ended_multi(
|
||||
|
||||
|
||||
def _open_ended_total_steps(mode: str) -> int:
|
||||
angle_count = 2 if mode == "fast" else 4
|
||||
return 2 + angle_count + 2 + (1 if mode == "deep" else 0)
|
||||
if mode == "fast":
|
||||
return 2
|
||||
angle_count = 4
|
||||
return 2 + angle_count + 2 + 1
|
||||
|
||||
|
||||
def _open_ended_fast(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user