Heewon Oh Claude Sonnet 4.5 commited on
Commit
712a7cd
·
1 Parent(s): d4a5dee

fix(agent): sentence-transformers 추가 및 ActionType 직렬화 수정

Browse files

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

Files changed (2) hide show
  1. requirements.txt +1 -0
  2. vela/agent.py +5 -5
requirements.txt CHANGED
@@ -10,3 +10,4 @@ accelerate>=0.28
10
  bitsandbytes>=0.43
11
  huggingface_hub>=0.20
12
  sentencepiece>=0.2
 
 
10
  bitsandbytes>=0.43
11
  huggingface_hub>=0.20
12
  sentencepiece>=0.2
13
+ sentence-transformers>=2.7
vela/agent.py CHANGED
@@ -289,7 +289,7 @@ class ResearchAgent:
289
  logger.warning(
290
  f"연속 search {consecutive_search_count}회 도달 - analyze 강제"
291
  )
292
- step.action = ActionType.ANALYZE
293
  step.observation = (
294
  f"연속 search {MAX_CONSECUTIVE_SEARCH}회 제한으로 analyze 전환"
295
  )
@@ -556,7 +556,7 @@ class ResearchAgent:
556
  )
557
 
558
  # 액션 시퀀스
559
- action_sequence = [s.action.value for s in steps]
560
 
561
  # =================================================================
562
  # Claim-Evidence 매핑 생성 (Writer 학습용)
@@ -1071,7 +1071,7 @@ JSON 형식으로 응답하세요:
1071
  return TrajectoryStep(
1072
  step=step_num,
1073
  pre_state=pre_state,
1074
- action=step.action.value,
1075
  action_input=step.query,
1076
  observation=observation,
1077
  post_state=post_state,
@@ -1340,7 +1340,7 @@ JSON 형식으로 응답하세요:
1340
  {
1341
  "step": s.step_number,
1342
  "thought": s.thought,
1343
- "action": s.action.value,
1344
  "query": s.query,
1345
  "observation": s.observation,
1346
  "confidence": s.confidence,
@@ -1517,7 +1517,7 @@ JSON 형식으로 응답하세요:
1517
  {
1518
  "step": step.step_number,
1519
  "thought": step.thought,
1520
- "action": step.action.value,
1521
  "query": step.query,
1522
  "observation": step.observation,
1523
  "sources_found": step.sources_found,
 
289
  logger.warning(
290
  f"연속 search {consecutive_search_count}회 도달 - analyze 강제"
291
  )
292
+ step.action = "analyze" # use_enum_values=True bypass 방지
293
  step.observation = (
294
  f"연속 search {MAX_CONSECUTIVE_SEARCH}회 제한으로 analyze 전환"
295
  )
 
556
  )
557
 
558
  # 액션 시퀀스
559
+ action_sequence = [str(s.action) for s in steps]
560
 
561
  # =================================================================
562
  # Claim-Evidence 매핑 생성 (Writer 학습용)
 
1071
  return TrajectoryStep(
1072
  step=step_num,
1073
  pre_state=pre_state,
1074
+ action=str(step.action),
1075
  action_input=step.query,
1076
  observation=observation,
1077
  post_state=post_state,
 
1340
  {
1341
  "step": s.step_number,
1342
  "thought": s.thought,
1343
+ "action": str(s.action),
1344
  "query": s.query,
1345
  "observation": s.observation,
1346
  "confidence": s.confidence,
 
1517
  {
1518
  "step": step.step_number,
1519
  "thought": step.thought,
1520
+ "action": str(step.action),
1521
  "query": step.query,
1522
  "observation": step.observation,
1523
  "sources_found": step.sources_found,