File tree Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Original file line number Diff line number Diff line change @@ -41,20 +41,6 @@ public function __construct(MessageRoleEnum $role, array $parts)
41
41
$ this ->parts = $ parts ;
42
42
}
43
43
44
- /**
45
- * Creates a message from a simple text string.
46
- *
47
- * @since n.e.x.t
48
- *
49
- * @param MessageRoleEnum $role The role of the message sender.
50
- * @param string $text The text content.
51
- * @return self
52
- */
53
- public static function fromText (MessageRoleEnum $ role , string $ text ): self
54
- {
55
- return new self ($ role , [MessagePart::text ($ text )]);
56
- }
57
-
58
44
/**
59
45
* Gets the role of the message sender.
60
46
*
@@ -91,7 +77,7 @@ public static function getJsonSchema(): array
91
77
'properties ' => [
92
78
'role ' => [
93
79
'type ' => 'string ' ,
94
- 'enum ' => [ ' user ' , ' model ' , ' system ' ] ,
80
+ 'enum ' => MessageRoleEnum:: getValues () ,
95
81
'description ' => 'The role of the message sender. ' ,
96
82
],
97
83
'parts ' => [
You can’t perform that action at this time.
0 commit comments