@@ -106,22 +106,20 @@ final class ModelConfig extends AbstractDataValueObject
106
106
protected ?array $ tools = null ;
107
107
108
108
/**
109
- * @var array<string, mixed>|null Custom provider-specific options.
109
+ * @var array<string, mixed> Custom provider-specific options.
110
110
*/
111
- protected ? array $ customOptions = null ;
111
+ protected array $ customOptions = [] ;
112
112
113
113
/**
114
114
* Sets the output modalities.
115
115
*
116
116
* @since n.e.x.t
117
117
*
118
118
* @param ModalityEnum[] $outputModalities The output modalities.
119
- * @return self For method chaining.
120
119
*/
121
- public function setOutputModalities (array $ outputModalities ): self
120
+ public function setOutputModalities (array $ outputModalities ): void
122
121
{
123
122
$ this ->outputModalities = $ outputModalities ;
124
- return $ this ;
125
123
}
126
124
127
125
/**
@@ -142,12 +140,10 @@ public function getOutputModalities(): ?array
142
140
* @since n.e.x.t
143
141
*
144
142
* @param string $systemInstruction The system instruction.
145
- * @return self For method chaining.
146
143
*/
147
- public function setSystemInstruction (string $ systemInstruction ): self
144
+ public function setSystemInstruction (string $ systemInstruction ): void
148
145
{
149
146
$ this ->systemInstruction = $ systemInstruction ;
150
- return $ this ;
151
147
}
152
148
153
149
/**
@@ -168,12 +164,10 @@ public function getSystemInstruction(): ?string
168
164
* @since n.e.x.t
169
165
*
170
166
* @param int $candidateCount The candidate count.
171
- * @return self For method chaining.
172
167
*/
173
- public function setCandidateCount (int $ candidateCount ): self
168
+ public function setCandidateCount (int $ candidateCount ): void
174
169
{
175
170
$ this ->candidateCount = $ candidateCount ;
176
- return $ this ;
177
171
}
178
172
179
173
/**
@@ -194,12 +188,10 @@ public function getCandidateCount(): ?int
194
188
* @since n.e.x.t
195
189
*
196
190
* @param int $maxTokens The maximum tokens.
197
- * @return self For method chaining.
198
191
*/
199
- public function setMaxTokens (int $ maxTokens ): self
192
+ public function setMaxTokens (int $ maxTokens ): void
200
193
{
201
194
$ this ->maxTokens = $ maxTokens ;
202
- return $ this ;
203
195
}
204
196
205
197
/**
@@ -220,12 +212,10 @@ public function getMaxTokens(): ?int
220
212
* @since n.e.x.t
221
213
*
222
214
* @param float $temperature The temperature.
223
- * @return self For method chaining.
224
215
*/
225
- public function setTemperature (float $ temperature ): self
216
+ public function setTemperature (float $ temperature ): void
226
217
{
227
218
$ this ->temperature = $ temperature ;
228
- return $ this ;
229
219
}
230
220
231
221
/**
@@ -246,12 +236,10 @@ public function getTemperature(): ?float
246
236
* @since n.e.x.t
247
237
*
248
238
* @param float $topP The top-p parameter.
249
- * @return self For method chaining.
250
239
*/
251
- public function setTopP (float $ topP ): self
240
+ public function setTopP (float $ topP ): void
252
241
{
253
242
$ this ->topP = $ topP ;
254
- return $ this ;
255
243
}
256
244
257
245
/**
@@ -272,12 +260,10 @@ public function getTopP(): ?float
272
260
* @since n.e.x.t
273
261
*
274
262
* @param int $topK The top-k parameter.
275
- * @return self For method chaining.
276
263
*/
277
- public function setTopK (int $ topK ): self
264
+ public function setTopK (int $ topK ): void
278
265
{
279
266
$ this ->topK = $ topK ;
280
- return $ this ;
281
267
}
282
268
283
269
/**
@@ -298,12 +284,10 @@ public function getTopK(): ?int
298
284
* @since n.e.x.t
299
285
*
300
286
* @param string[] $stopSequences The stop sequences.
301
- * @return self For method chaining.
302
287
*/
303
- public function setStopSequences (array $ stopSequences ): self
288
+ public function setStopSequences (array $ stopSequences ): void
304
289
{
305
290
$ this ->stopSequences = $ stopSequences ;
306
- return $ this ;
307
291
}
308
292
309
293
/**
@@ -324,12 +308,10 @@ public function getStopSequences(): ?array
324
308
* @since n.e.x.t
325
309
*
326
310
* @param float $presencePenalty The presence penalty.
327
- * @return self For method chaining.
328
311
*/
329
- public function setPresencePenalty (float $ presencePenalty ): self
312
+ public function setPresencePenalty (float $ presencePenalty ): void
330
313
{
331
314
$ this ->presencePenalty = $ presencePenalty ;
332
- return $ this ;
333
315
}
334
316
335
317
/**
@@ -350,12 +332,10 @@ public function getPresencePenalty(): ?float
350
332
* @since n.e.x.t
351
333
*
352
334
* @param float $frequencyPenalty The frequency penalty.
353
- * @return self For method chaining.
354
335
*/
355
- public function setFrequencyPenalty (float $ frequencyPenalty ): self
336
+ public function setFrequencyPenalty (float $ frequencyPenalty ): void
356
337
{
357
338
$ this ->frequencyPenalty = $ frequencyPenalty ;
358
- return $ this ;
359
339
}
360
340
361
341
/**
@@ -376,12 +356,10 @@ public function getFrequencyPenalty(): ?float
376
356
* @since n.e.x.t
377
357
*
378
358
* @param bool $logprobs Whether to return log probabilities.
379
- * @return self For method chaining.
380
359
*/
381
- public function setLogprobs (bool $ logprobs ): self
360
+ public function setLogprobs (bool $ logprobs ): void
382
361
{
383
362
$ this ->logprobs = $ logprobs ;
384
- return $ this ;
385
363
}
386
364
387
365
/**
@@ -402,12 +380,10 @@ public function getLogprobs(): ?bool
402
380
* @since n.e.x.t
403
381
*
404
382
* @param int $topLogprobs The number of top log probabilities.
405
- * @return self For method chaining.
406
383
*/
407
- public function setTopLogprobs (int $ topLogprobs ): self
384
+ public function setTopLogprobs (int $ topLogprobs ): void
408
385
{
409
386
$ this ->topLogprobs = $ topLogprobs ;
410
- return $ this ;
411
387
}
412
388
413
389
/**
@@ -428,12 +404,10 @@ public function getTopLogprobs(): ?int
428
404
* @since n.e.x.t
429
405
*
430
406
* @param Tool[] $tools The tools.
431
- * @return self For method chaining.
432
407
*/
433
- public function setTools (array $ tools ): self
408
+ public function setTools (array $ tools ): void
434
409
{
435
410
$ this ->tools = $ tools ;
436
- return $ this ;
437
411
}
438
412
439
413
/**
@@ -454,22 +428,20 @@ public function getTools(): ?array
454
428
* @since n.e.x.t
455
429
*
456
430
* @param array<string, mixed> $customOptions The custom options.
457
- * @return self For method chaining.
458
431
*/
459
- public function setCustomOptions (array $ customOptions ): self
432
+ public function setCustomOptions (array $ customOptions ): void
460
433
{
461
434
$ this ->customOptions = $ customOptions ;
462
- return $ this ;
463
435
}
464
436
465
437
/**
466
438
* Gets the custom options.
467
439
*
468
440
* @since n.e.x.t
469
441
*
470
- * @return array<string, mixed>|null The custom options.
442
+ * @return array<string, mixed> The custom options.
471
443
*/
472
- public function getCustomOptions (): ? array
444
+ public function getCustomOptions (): array
473
445
{
474
446
return $ this ->customOptions ;
475
447
}
@@ -629,9 +601,7 @@ public function toArray(): array
629
601
}, $ this ->tools ));
630
602
}
631
603
632
- if ($ this ->customOptions !== null ) {
633
- $ data ['customOptions ' ] = $ this ->customOptions ;
634
- }
604
+ $ data ['customOptions ' ] = $ this ->customOptions ;
635
605
636
606
return $ data ;
637
607
}
0 commit comments