Reputation: 2987
Scenario: I am trying write a request / response logger advisor since SimpleLoggingAdvisor does not log tool invocation and observation. As I implemented the CallAroundAdvisor, I stumbled upon the same problem as I am guessing the SimpleLoggingAdvisor had which is it only advises around the "call" of chatclient and not the ChatModel Line 287 in the screenshot below.
Couple of side effects of this:
toolCalls
object under the AssistantMessage is always empty [Generation[assistantMessage=AssistantMessage [messageType=ASSISTANT, toolCalls=[]
I am porting over from langchain4j and the first difference I realized is how langchain4j logs every request / response, including tool chain calls but by default spring-ai only logs the user message and the final assistant message.
Also the inMemoryChatMemory
has a similar problem where tool chain calls are NOT added to the history. Maybe that's a separate problem and potentially the tool chain should have it's own memory for debugging.
Upvotes: 0
Views: 16