**kwargs)        485     if len(args) != 1:        486         raise ValueError("`run` supports only one positional argument.")    --> 487     return self(args[0], callbacks=callbacks, tags=tags, metadata=metadata)[        488         _output_key        489     ]        491 if kwargs and not args:        492     return self(kwargs, callbacks=callbacks, tags=tags, metadata=metadata)[        493         _output_key        494     ]    File ~/Documents/Projects/langchain/libs/langchain/langchain/chains/base.py:292, in Chain.__call__(self, inputs, return_only_outputs, callbacks, tags, metadata, run_name, include_run_info)        290 except (KeyboardInterrupt, Exception) as e:        291     run_manager.on_chain_error(e)    --> 292     raise e        293 run_manager.on_chain_end(outputs)        294 final_outputs: Dict[str, Any] = self.prep_outputs(        295     inputs, outputs, return_only_outputs        296 )    File ~/Documents/Projects/langchain/libs/langchain/langchain/chains/base.py:286, in Chain.__call__(self, inputs, return_only_outputs, callbacks, tags, metadata, run_name, include_run_info)        279 run_manager = callback_manager.on_chain_start(        280     dumpd(self),        281     inputs,        282     name=run_name,        283 )        284 try:        285     outputs = (    --> 286         self._call(inputs, run_manager=run_manager)        287         if new_arg_supported        288         else self._call(inputs)        289     )        290 except (KeyboardInterrupt, Exception) as e:        291     run_manager.on_chain_error(e)    File ~/Documents/Projects/langchain/libs/langchain/langchain/agents/agent.py:1039, in AgentExecutor._call(self, inputs, run_manager)       1037 # We now enter the agent loop (until it returns something).       1038 while self._should_continue(iterations, time_elapsed):    -> 1039     next_step_output = self._take_next_step(       1040         name_to_tool_map,       1041         color_mapping,       1042         inputs,
This notebook shows how to prevent prompt injection attacks using the text classification model from HuggingFace.
This notebook shows how to prevent prompt injection attacks using the text classification model from HuggingFace. ->: **kwargs)        485     if len(args) != 1:        486         raise ValueError("`run` supports only one positional argument.")    --> 487     return self(args[0], callbacks=callbacks, tags=tags, metadata=metadata)[        488         _output_key        489     ]        491 if kwargs and not args:        492     return self(kwargs, callbacks=callbacks, tags=tags, metadata=metadata)[        493         _output_key        494     ]    File ~/Documents/Projects/langchain/libs/langchain/langchain/chains/base.py:292, in Chain.__call__(self, inputs, return_only_outputs, callbacks, tags, metadata, run_name, include_run_info)        290 except (KeyboardInterrupt, Exception) as e:        291     run_manager.on_chain_error(e)    --> 292     raise e        293 run_manager.on_chain_end(outputs)        294 final_outputs: Dict[str, Any] = self.prep_outputs(        295     inputs, outputs, return_only_outputs        296 )    File ~/Documents/Projects/langchain/libs/langchain/langchain/chains/base.py:286, in Chain.__call__(self, inputs, return_only_outputs, callbacks, tags, metadata, run_name, include_run_info)        279 run_manager = callback_manager.on_chain_start(        280     dumpd(self),        281     inputs,        282     name=run_name,        283 )        284 try:        285     outputs = (    --> 286         self._call(inputs, run_manager=run_manager)        287         if new_arg_supported        288         else self._call(inputs)        289     )        290 except (KeyboardInterrupt, Exception) as e:        291     run_manager.on_chain_error(e)    File ~/Documents/Projects/langchain/libs/langchain/langchain/agents/agent.py:1039, in AgentExecutor._call(self, inputs, run_manager)       1037 # We now enter the agent loop (until it returns something).       1038 while self._should_continue(iterations, time_elapsed):    -> 1039     next_step_output = self._take_next_step(       1040         name_to_tool_map,       1041         color_mapping,       1042         inputs,