fix(captain-memory): raise RecallService timeout 0.5s -> 2.0s

Real-world observation: OpenAI embedding API takes 200-400ms typical,
plus pgvector query overhead, the 500ms budget was being exceeded
frequently, silently dropping memory recall. Agent typing delay is
already 2-15s humanized, so a 2s recall budget is well within UX
tolerance and gives ~4-5x margin over typical embedding latency.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Rodribm10 2026-04-19 07:25:19 -03:00
parent 1ce07cc78c
commit 5874029a03

View File

@ -1,5 +1,5 @@
class Captain::ContactMemories::RecallService
TIMEOUT_SECONDS = 0.5
TIMEOUT_SECONDS = 2.0
DEFAULT_TOP_K = 5
def initialize(contact:, query_text:, unit_id: nil, top_k: DEFAULT_TOP_K)