This solves the problem, thank you! Although I ended up making the ResponseViewModel a class as I was running into issues with the tool complaining about mutating the struct and then non-conforming to the tool protocol. There is probably a way to do it with it being a struct, but this seems like a good approach since I have to reset the vars to nil on the ResponseViewModel after each call to the LLM session.
Topic:
Machine Learning & AI
SubTopic:
Foundation Models
Tags: