You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Message templates allow dynamic variable substitution in messages. Both system and user messages support templates, enabling reusable message patterns with runtime variables.
236
+
237
+
String Templates
238
+
................
239
+
240
+
String templates use curly braces for variable placeholders::
241
+
242
+
use Symfony\AI\Platform\Message\Message;
243
+
use Symfony\AI\Platform\Message\MessageBag;
244
+
use Symfony\AI\Platform\Message\Template;
245
+
246
+
// System message with template
247
+
$messages = new MessageBag(
248
+
Message::forSystem(Template::string('You are a {role} assistant.')),
0 commit comments