extractCustomInstructions 提取自定义指令
()
| 746 | |
| 747 | // extractCustomInstructions 提取自定义指令 |
| 748 | func (a *Agent) extractCustomInstructions() string { |
| 749 | if a.config.Metadata == nil { |
| 750 | return "" |
| 751 | } |
| 752 | |
| 753 | if instructions, ok := a.config.Metadata["custom_instructions"].(string); ok { |
| 754 | return instructions |
| 755 | } |
| 756 | |
| 757 | return "" |
| 758 | } |
| 759 | |
| 760 | // extractContextWindowConfig 提取上下文窗口配置 |
| 761 | func (a *Agent) extractContextWindowConfig() *struct { |