feat(ui): Add summary details of each observable

Signed-off-by: Richard Palethorpe <io@richiejp.com>
This commit is contained in:
Richard Palethorpe
2025-04-23 14:11:52 +01:00
parent 12209ab926
commit f5d8e0c9cf
4 changed files with 316 additions and 66 deletions

View File

@@ -180,6 +180,12 @@ func (a *Agent) Execute(j *types.Job) *types.JobResult {
}()
if j.Obs != nil {
if len(j.ConversationHistory) > 0 {
m := j.ConversationHistory[len(j.ConversationHistory)-1]
j.Obs.Creation = &types.Creation{ ChatCompletionMessage: &m }
a.observer.Update(*j.Obs)
}
j.Result.AddFinalizer(func(ccm []openai.ChatCompletionMessage) {
j.Obs.Completion = &types.Completion{
Conversation: ccm,