diff --git a/src/latent_explorer/llm.py b/src/latent_explorer/llm.py index fefdb7c..0e7eba7 100644 --- a/src/latent_explorer/llm.py +++ b/src/latent_explorer/llm.py @@ -151,7 +151,7 @@ def _generate(self, input_ids:torch.Tensor, parse_output:bool) -> Tuple[str, tor # Parse the output text to JSON if parse_output and len(generated_text) > 0: - generated_text = text2json(generated_text, max_attempts = 3) + generated_text = text2json(generated_text, max_attempts = 3, verbose = True) return generated_text, hidden_states diff --git a/src/latent_explorer/utils/utils.py b/src/latent_explorer/utils/utils.py index ec6fdba..f0866dc 100644 --- a/src/latent_explorer/utils/utils.py +++ b/src/latent_explorer/utils/utils.py @@ -31,7 +31,7 @@ def generate_prompt_template(sys_prompt = None, examples: list[dict] = [], input return conversation -def text2json(output, max_attempts = 3, verbose = True): +def text2json(output, max_attempts = 3, verbose = False): # Attempt to parse the output as JSON with some error handling num_attempts = 0