|
| 1 | +/* |
| 2 | + * Copyright 2026 CloudWeGo Authors |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | + |
| 17 | +package summarization |
| 18 | + |
| 19 | +import ( |
| 20 | + "github.com/cloudwego/eino/adk" |
| 21 | +) |
| 22 | + |
| 23 | +type CustomizedAction struct { |
| 24 | + // Type is the action type. |
| 25 | + Type ActionType `json:"type"` |
| 26 | + |
| 27 | + // Before is set when Type is ActionTypeBeforeSummary. |
| 28 | + // Emitted after trigger condition is met, before calling model to generate summary. |
| 29 | + Before *BeforeSummaryAction `json:"before,omitempty"` |
| 30 | + |
| 31 | + // After is set when Type is ActionTypeAfterSummary. |
| 32 | + // Emitted after summary generation, before applying new messages to state. |
| 33 | + After *AfterSummaryAction `json:"after,omitempty"` |
| 34 | +} |
| 35 | + |
| 36 | +type BeforeSummaryAction struct { |
| 37 | + // Messages is the original state messages before summarization. |
| 38 | + Messages []adk.Message `json:"messages,omitempty"` |
| 39 | +} |
| 40 | + |
| 41 | +type AfterSummaryAction struct { |
| 42 | + // Messages is the final state messages after summarization. |
| 43 | + Messages []adk.Message `json:"messages,omitempty"` |
| 44 | +} |
0 commit comments