You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: session.rs
    path of file: ./repos/CodeCursor/crates/cursor-core/src/services/chat
    
    the code of the file until where you have to start completion: use std::pin::pin;

use futures::StreamExt;
use node_bridge::prelude::*;
use wasm_bindgen::{JsError, JsValue};

use crate::{
    services::{
        enveloped_message::{FilledPrompt, MessageContent},
        stream::make_stream,

    
    fn body_with_input(&mut self, input: &GenerateInput) -> &RequestBody {
        self.request_body = Some(
            self.request_body
                .take()
                .map(|mut r| {
                    r.conversation
                        .push(ConversationMessage::new(MessageType::User, input.prompt()));
                    r
                })
                .unwrap_or_else(|| RequestBody::new_with_input(input)),
        )
        .map(|mut r| {
            // Add an empty bot message to the conversation.
            r.conversation
                .push(ConversationMessage::empty_message(MessageType::Bot));
            r
        });
        self.request_body.as_ref().unwrap()
    }