if examples:
            params["examples"] = _parse_examples(examples)
        chat = self._start_chat(history, params)
        responses = chat.send_message_streaming(question.content, **params)
        for response in responses:
            if run_manager:
                run_manager.on_llm_new_token(response.text)
            yield ChatGenerationChunk(message=AIMessageChunk(content=response.text))
    def _start_chat(
        self, history: _ChatHistory, params: dict
    ) -> Union[ChatSession, CodeChatSession]:
        if not self.is_codey_model:
            return self.client.start_chat(
                context=history.context, message_history=history.history, **params
            )
        else:
            return self.client.start_chat(message_history=history.history, **params)