class_docstr: Multi-turn conversational pipeline.
  
  This conversational pipeline can currently be loaded from [`pipeline`] using the following task identifier:
  `"conversational"`.
  
  The models that this pipeline can use are models that have been fine-tuned on a multi-turn conversational task,
  currently: *'microsoft/DialoGPT-small'*, *'microsoft/DialoGPT-medium'*, *'microsoft/DialoGPT-large'*. See the
  up-to-date list of available models on
  [huggingface.co/models](https://huggingface.co/models?filter=conversational).
  
  Usage:
  
  ```python
  conversational_pipeline = pipeline("conversational")
  
  conversation_1 = Conversation("Going to the movies tonight - any suggestions?")
  conversation_2 = Conversation("What's the last book you have read?")
  
  conversational_pipeline([conversation_1, conversation_2])
  
  conversation_1.add_user_input("Is it an action movie?")
  conversation_2.add_user_input("What is the genre of this book?")
  
  conversational_pipeline([conversation_1, conversation_2])
  ```
class_docstr_tok: ["Multi-turn","conversational","pipeline",".","This","conversational","pipeline","can","currently","be","loaded","from","[","`","pipeline","`","]","using","the","following","task","identifier",":","`","``","conversational","''","`",".","The","models","that","this","pipeline","can","use","are","models","that","have","been","fine-tuned","on","a","multi-turn","conversational","task",",","currently",":","*","'microsoft\/DialoGPT-small","'","*",",","*","'microsoft\/DialoGPT-medium","'","*",",","*","'microsoft\/DialoGPT-large","'","*",".","See","the","up-to-date","list","of","available","models","on","[","huggingface.co\/models","]","(","https",":","\/\/huggingface.co\/models","?","filter=conversational",")",".","Usage",":","``","`","python","conversational_pipeline","=","pipeline","(","``","conversational","''",")","conversation_1","=","Conversation","(","``","Going","to","the","movies","tonight","-","any","suggestions","?","''",")","conversation_2","=","Conversation","(","``","What","'s","the","last","book","you","have","read","?","''",")","conversational_pipeline","(","[","conversation_1",",","conversation_2","]",")","conversation_1.add_user_input","(","``","Is","it","an","action","movie","?","''",")","conversation_2.add_user_input","(","``","What","is","the","genre","of","this","book","?","''",")","conversational_pipeline","(","[","conversation_1",",","conversation_2","]",")","``","`"]
code: def preprocess(
      self, conversation: Conversation, min_length_for_response=32
  ) -> Dict[str, Any]:
      if not isinstance(conversation, Conversation):
          raise ValueError(
              "ConversationalPipeline, expects Conversation as inputs"
          )
      if conversation.new_user_input is None:
          raise ValueError(
              f"Conversation with UUID {type(conversation.uuid)} does not contain new user input to process. "
              "Add user inputs with the conversation's `add_user_input` method"
          )
      if hasattr(self.tokenizer, "_build_conversation_input_ids"):
          input_ids = self.tokenizer._build_conversation_input_ids(
              conversation
          )
      else:
          # If the tokenizer cannot handle conversations, we default to only the old version
          input_ids = self._legacy_parse_and_tokenize(conversation)
  
      if self.framework == "pt":
          input_ids = torch.LongTensor([input_ids])
      elif self.framework == "tf":
          input_ids = tf.constant([input_ids])
      return {"input_ids": input_ids, "conversation": conversation}
  
imports: import uuid
  from typing import Any, Dict, List, Optional, Union
  from ..utils import add_end_docstrings, is_tf_available, is_torch_available, logging
  from .base import PIPELINE_INIT_ARGS, Pipeline
label_desc: Use image node_id 4 for calling the ConversationalPipeline obj's underlying member method code with example usage: obj.preprocess(conversation, min_length_for_response) and returns: dict