Hello! We're trying to simultaneously log both the...
# agents
f
Hello! We're trying to simultaneously log both the inputs and outputs to the stt, llm and tts nodes. We were able to view the outputted chunks to the llm, but haven't found a way to log inputs to the llm node as well?
r
Have you tried something like this in your agent?
Copy code
async def llm_node(self, chat_ctx, tools, model_settings):  
        # Log the input chat context  
        logger.info(f"LLM Input: {chat_ctx.to_dict()}")  
        
        # Call the default implementation and stream outputs  
        async for chunk in Agent.default.llm_node(self, chat_ctx, tools, model_settings):  
            # Log each output chunk  
            logger.info(f"LLM Output chunk: {chunk}")  
            yield chunk
f
thanks for this we're trying to figure out how the streaming is actually working is there a way to log the inputs and outputs of all nodes as they're being streamed?