| 1 | import Foundation |
| 2 | import Stencil |
| 3 | |
| 4 | public struct PromptTemplate { |
| 5 | let template: String |
| 6 | let data: [String: Any] |
| 7 | |
| 8 | public func render() throws -> String { |
| 9 | let template = Template(templateString: self.template) |
| 10 | return try template.render(self.data) |
| 11 | } |
| 12 | } |