BaseCallbackHandler on_llm_new_token not working with custom MultiRouteChain
Labels: name: auto:bug, name: area: models

### System Info

Hi, I've implemented my own MultiRouteChain

### Who can help?

@UmerHA 
@hwchase17 

### Information

- [ ] The official example notebooks/scripts
- [X] My own modified scripts

### Related Components

- [ ] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [X] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

This is the implementation of mycallbackhandler, taken from this documentation:
https://github.com/langchain-ai/langchain/issues/5433

class MyCallbackHandler(BaseCallbackHandler):
    def on_llm_new_token(self, token, **kwargs) -> None:
        # print every token on a new line
        print(f"#{token}#")

This is part of the implementation of my classs:

class NestedRouterMultiType(MultiRouteChain):


    @classmethod
    def from_prompts_and_retrievers(
        cls,
        llm: BaseLanguageModel,
        prompt_infos: List[Dict[str, str]],
        retrieval_infos: List[Dict[str, Any]],
        router_infos: List[Dict[str, Dict[str, List[Dict[str, Any]]]]],
        default_chain: Optional[Chain] = None,
        #We can include default retrievers, but for now it is useful to just use GPT as the default chain
        return_source_documents: bool = False,
        verbose: bool = False,
        **kwargs: Any,
    ) -> NestedRouterMultiType:
        """Convenience constructor for instantiating from destination prompts and retrievers."""
        # Combine prompt and retriever infos for destinations

        destinations = [f"{p['name']}: {p['description']}" for p in prompt_infos + retrieval_infos + router_infos]
        destinations_str = "\n".join(destinations)
        router_template = MULTI_TYPE_ROUTER_TEMPLATE_TEST.format(
            destinations=destinations_str
        )
        router_prompt = PromptTemplate(
            template=router_template,
            input_variables=["input", "context"],
            output_parser=RouterOutputParserConversational(),
        )
        router_chain = LLMRouterChainConversational.from_llm(llm, router_prompt)
        destination_chains = {}
        for p_info in prompt_infos:
            name = p_info["name"]
            prompt_template = p_info["prompt_template"]

            input_variables = cls._extract_variables_from_template(prompt_template)
            # Include here input variables input and history and test whether history is being passed correctly
            #Deprecated line of code:
            #prompt = PromptTemplate(template=prompt_template, input_variables=["question", "chat_history"])
            prompt = PromptTemplate(template=prompt_template, input_variables=input_variables)
            
            chain = UnifiedLLMChain(
                prompt=prompt,
                llm=llm,
                verbose=verbose,
                callbacks=[MyCallbackHandler()],
            )
            destination_chains[name] = chain

        for r_info in retrieval_infos:
            # refactor this to pass all arguments in PromptFactory
            name = r_info["name"]
            prompt = r_info.get("prompt") #try to retrieve a prompt, if empty, use None (not sure yet what this prompt is for)
            retriever = r_info["retriever"]
            condense_prompt_template = r_info["condense_prompt_template"]
            prompt_template = r_info["prompt_template"]

            # Here's where we create a Router that can route to ConversationalRetrievalChains
            chain = ConversationalRetrievalChainHistory.from_llm(
                llm, 
                retriever=retriever, 
                combine_docs_chain_kwargs={"prompt": prompt_template},
                condense_question_prompt=condense_prompt_template, 
                return_source_documents = return_source_documents,
                verbose=verbose,
                callbacks=[MyCallbackHandler()],
            )
            destination_chains[name] = chain

  
 

### Expected behavior

I expect to print all tokens on each chain. The output is nonexistent. Either I'm missing something or it is a bug. The streaming parameter is set to True on BaseLanguageModel.