Skip LastAgent in Result JSON serialization
Result.LastAgent is *Agent, which holds only unexported fields. The default json.Marshal renders it as an empty object, which is misleading when persisted alongside the agent run. Tag LastAgent as json:"-" and add explicit lowercase JSON tags to the remaining fields so the serialized shape is stable for callers that read the persisted result column. Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
This commit is contained in:
@@ -21,7 +21,7 @@ type (
|
||||
Messages []llm.Message
|
||||
Usage llm.Usage
|
||||
Turns int
|
||||
LastAgent *Agent
|
||||
LastAgent *Agent `json:"-"`
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user