Call a function with parameters from Update()

enter code hereI have been thinking since some time how to call the function:

public override void SendMeMessage (InputField input){
			MyStringMessage myMessage = new MyStringMessage ();
			
			myNewMessage.value = input.text;
			
			NetworkManager.singleton.client.Send (chatMessage, myNewMessage);
			
		}

in Update():

void Update(){
			
			if(Input.GetKeyDown(KeyCode.Return)){
				//SendMeMessage (InputField input)
			}
		}

Update() doesn’t take any parameters.

Thank you for your answers.

I tried to rewrite the code not to have the function with a parameter and then call it easily in Update, but this destroys all my code. It seems the only solution is to have input outside the function. After a few tests, the only solution that works for me is:

private InputField input;

void Update(){
			input = GameObject.Find("InputField").GetComponent<InputField>();
			if(Input.GetKeyDown(KeyCode.Return)){
				SendMessage(input);
			}
		}

It works with the UI button like before and with the Return key.