forwardEvents reads events from the RAG manager and forwards them via the callback.
(ctx context.Context)
| 110 | |
| 111 | // forwardEvents reads events from the RAG manager and forwards them via the callback. |
| 112 | func (t *ToolSet) forwardEvents(ctx context.Context) { |
| 113 | for { |
| 114 | select { |
| 115 | case <-ctx.Done(): |
| 116 | return |
| 117 | case event, ok := <-t.manager.Events(): |
| 118 | if !ok { |
| 119 | return |
| 120 | } |
| 121 | t.eventCallback(event) |
| 122 | } |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | func (t *ToolSet) Instructions() string { |
| 127 | if t.manager != nil { |
no test coverage detected