Upload code/agentic_chat.py with huggingface_hub
Browse files187 unmodified lines188189190191192193194195196197187 unmodified linesprint(f"{CYAN} Result length: {len(pre_result)} chars{RESET}\n")if pre_result and "No results" not in pre_result and "timed out" not in pre_result:# Inject context directly into the prompt before generationprompt = (f"<|user|>\n{message}<|endofturn|>\n"f"<search_result>\n{pre_result}\n</search_result>\n"f"<|assistant|>\n")# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ187 unmodified lines188189190191192193194195196197198199187 unmodified linesprint(f"{CYAN} Result length: {len(pre_result)} chars{RESET}\n")if pre_result and "No results" not in pre_result and "timed out" not in pre_result:# Inject context directly into the prompt before generation# Inject context AFTER <|assistant|> to match V4 training formatprompt = (f"<|user|>\n{message}<|endofturn|>\n"f"<|assistant|>\n"f"<search>{message}</search>\n"f"<search_result>\n{pre_result}\n</search_result>\n")# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
code/agentic_chat.py+3-1