sometimes the models I'm using seem to not be able...
# koog-agentic-framework
b
sometimes the models I'm using seem to not be able to service the request and ask for more context; is there a way to detect that re-execute the node if that happens?
✅ 1
d
b
thank you!
kodee welcoming 1
ah, those seem to only talk about network related issues
I guess you want something like onCondition { somehowMatchTextThatAsksForContext(it) } in your strategy?
not sure if llm apis actually have specific http error codes for these messages
d
Yeah, IIRC there is some retry code around structured output handling somewhere in the codebase. You might want to take inspiration there.
s
@Didier Villevalois, it should be inside
StructureFixingParser
if I got your example right. It has a retry mechanism under the hood. @Bernhard, there is also
subgraphWithRetry
API that allows you to pass a condition as a parameter. Here you can handle the output message based on your requirements.
d
Hehe, I have so much code in my head, I only try to remember where I've seen it... 😆 Yeah I was thinking about the fixing parser. I did forget about the subgraph with retry though. Indeed that would better fit @Bernhard's need.
s
Nice! 🙂