package com.arms.api.sample.logging;

import lombok.extern.slf4j.Slf4j;
import org.springframework.ai.chat.client.advisor.api.*;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class SimpleLogAdvisor implements BaseAdvisor {

    @Override
    public AdvisedRequest before(AdvisedRequest request) {
        log.info("SimpleLoggerAdvisor::before - advisedRequest: {}", request);
        return request;
    }

    @Override
    public AdvisedResponse after(AdvisedResponse advisedResponse) {
        log.info("SimpleLoggerAdvisor::after - advisedResponse: {}", advisedResponse);
        return advisedResponse;
    }

    @Override
    public int getOrder() {
        return 0;
    }
}
