(ctx context.Context, req *aibridge.ModelThoughtRecord)
| 114 | } |
| 115 | |
| 116 | func (t *recorderTranslation) RecordModelThought(ctx context.Context, req *aibridge.ModelThoughtRecord) error { |
| 117 | _, err := t.client.RecordModelThought(ctx, &proto.RecordModelThoughtRequest{ |
| 118 | InterceptionId: req.InterceptionID, |
| 119 | Content: req.Content, |
| 120 | Metadata: marshalForProto(req.Metadata), |
| 121 | CreatedAt: timestamppb.New(req.CreatedAt), |
| 122 | }) |
| 123 | return err |
| 124 | } |
| 125 | |
| 126 | // marshalForProto will attempt to convert from aibridge.Metadata into a proto-friendly map[string]*anypb.Any. |
| 127 | // If any marshaling fails, rather return a map with the error details since we don't want to fail Record* funcs if metadata can't encode, |
nothing calls this directly
no test coverage detected