WatNeru commited on
Commit
58dfa5f
·
1 Parent(s): 04574d1

デバッグ出力強化

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -208,7 +208,7 @@ def build_word_tree(payload: WordTreeRequest) -> List[WordTreeResponse]:
208
  try:
209
  print(
210
  f"[API] build_word_tree called: prompt=\n##########################\n{payload.prompt_text}\n##########################\n', "
211
- f"root=\n%%%%%%%%%%%%%%%%%%%\n{payload.root_text}\n%%%%%%%%%%%%%%%%%%%\n', top_k={payload.top_k}, max_depth={payload.max_depth}"
212
  )
213
  # print(f"[API] Adapter available: {adapter is not None}")
214
 
@@ -219,7 +219,7 @@ def build_word_tree(payload: WordTreeRequest) -> List[WordTreeResponse]:
219
  max_depth=payload.max_depth,
220
  )
221
  # print(f"[API] Generated {len(results)} candidates")
222
-
223
  if not results:
224
  print("[API] No candidates generated, returning dummy candidates")
225
  results = _get_dummy_results()
 
208
  try:
209
  print(
210
  f"[API] build_word_tree called: prompt=\n##########################\n{payload.prompt_text}\n##########################\n', "
211
+ f"root=\n%%%%%%%%%%%%%%%%%%%\n{payload.root_text}\n%%%%%%%%%%%%%%%%%%%\n', top_k={payload.top_k}, max_depth={payload.max_depth}\n\n\n\n"
212
  )
213
  # print(f"[API] Adapter available: {adapter is not None}")
214
 
 
219
  max_depth=payload.max_depth,
220
  )
221
  # print(f"[API] Generated {len(results)} candidates")
222
+ print(f"--------------------------------\n[API] results: {[item['text'] for item in results]}\n--------------------------------")
223
  if not results:
224
  print("[API] No candidates generated, returning dummy candidates")
225
  results = _get_dummy_results()