@@ -296,69 +296,68 @@ direction LR
296
296
namespace AiClientNamespace {
297
297
class AiClient {
298
298
+prompt(string|Message|null $text = null) PromptBuilder$
299
- +message(?string $text ) MessageBuilder$
299
+ +message($input = null ) MessageBuilder$
300
300
}
301
301
}
302
302
303
303
namespace AiClientNamespace.Builders {
304
304
class PromptBuilder {
305
305
+withText(string $text) self
306
- +withInlineImage(string $base64Blob, string $mimeType)
307
- +withRemoteImage(string $uri, string $mimeType)
308
- +withImageFile(File $file) self
309
- +withAudioFile(File $file) self
310
- +withVideoFile(File $file) self
306
+ +withFile($file, ?string $mimeType) self
311
307
+withFunctionResponse(FunctionResponse $functionResponse) self
312
- +withMessageParts(...MessagePart $part ) self
308
+ +withMessageParts(...MessagePart $parts ) self
313
309
+withHistory(...Message $messages) self
314
310
+usingModel(ModelInterface $model) self
311
+ +usingModelConfig(ModelConfig $config) self
312
+ +usingProvider(string $providerIdOrClassName) self
315
313
+usingSystemInstruction(string $systemInstruction) self
316
314
+usingMaxTokens(int $maxTokens) self
317
315
+usingTemperature(float $temperature) self
318
316
+usingTopP(float $topP) self
319
317
+usingTopK(int $topK) self
320
318
+usingStopSequences(...string $stopSequences) self
321
319
+usingCandidateCount(int $candidateCount) self
322
- +usingOutputMime(string $mimeType) self
323
- +usingOutputSchema(array< string, mixed > $schema) self
324
- +usingOutputModalities(...ModalityEnum $modalities) self
320
+ +usingFunctionDeclarations(...FunctionDeclaration $functionDeclarations) self
321
+ +usingPresencePenalty(float $presencePenalty) self
322
+ +usingFrequencyPenalty(float $frequencyPenalty) self
323
+ +usingWebSearch(WebSearch $webSearch) self
324
+ +usingTopLogprobs(?int $topLogprobs) self
325
+ +asOutputMimeType(string $mimeType) self
326
+ +asOutputSchema(array< string, mixed > $schema) self
327
+ +asOutputModalities(...ModalityEnum $modalities) self
328
+ +asOutputFileType(FileTypeEnum $fileType) self
325
329
+asJsonResponse(?array< string, mixed > $schema) self
326
- +generateResult() GenerativeAiResult
327
- +generateOperation() GenerativeAiOperation
330
+ +generateResult(?CapabilityEnum $capability) GenerativeAiResult
328
331
+generateTextResult() GenerativeAiResult
329
- +streamGenerateTextResult() Generator< GenerativeAiResult >
330
332
+generateImageResult() GenerativeAiResult
331
- +convertTextToSpeechResult() GenerativeAiResult
332
333
+generateSpeechResult() GenerativeAiResult
333
- +generateEmbeddingsResult() EmbeddingResult
334
- +generateTextOperation() GenerativeAiOperation
335
- +generateImageOperation() GenerativeAiOperation
336
- +convertTextToSpeechOperation() GenerativeAiOperation
337
- +generateSpeechOperation() GenerativeAiOperation
338
- +generateEmbeddingsOperation() EmbeddingOperation
334
+ +convertTextToSpeechResult() GenerativeAiResult
339
335
+generateText() string
340
336
+generateTexts(?int $candidateCount) string[]
341
- +streamGenerateText() Generator< string >
342
337
+generateImage() File
343
338
+generateImages(?int $candidateCount) File[]
344
339
+convertTextToSpeech() File
345
340
+convertTextToSpeeches(?int $candidateCount) File[]
346
341
+generateSpeech() File
347
342
+generateSpeeches(?int $candidateCount) File[]
348
- +generateEmbeddings() Embedding[]
349
- +getModelRequirements() ModelRequirements
350
- +isSupported() bool
343
+ +isSupportedForTextGeneration() bool
344
+ +isSupportedForImageGeneration() bool
345
+ +isSupportedForTextToSpeechConversion() bool
346
+ +isSupportedForVideoGeneration() bool
347
+ +isSupportedForSpeechGeneration() bool
348
+ +isSupportedForMusicGeneration() bool
349
+ +isSupportedForEmbeddingGeneration() bool
351
350
}
352
351
353
352
class MessageBuilder {
354
- +usingRole(MessageRole $role) self
353
+ +usingRole(MessageRoleEnum $role) self
354
+ +usingUserRole() self
355
+ +usingModelRole() self
355
356
+withText(string $text) self
356
- +withImageFile(File $file) self
357
- +withAudioFile(File $file) self
358
- +withVideoFile(File $file) self
357
+ +withFile($file, ?string $mimeType) self
359
358
+withFunctionCall(FunctionCall $functionCall) self
360
359
+withFunctionResponse(FunctionResponse $functionResponse) self
361
- +withMessageParts(...MessagePart $part ) self
360
+ +withMessageParts(...MessagePart $parts ) self
362
361
+get() Message
363
362
}
364
363
}
@@ -445,7 +444,7 @@ direction LR
445
444
namespace AiClientNamespace {
446
445
class AiClient {
447
446
+prompt(string|Message|null $text = null) PromptBuilder$
448
- +message(?string $text ) MessageBuilder$
447
+ +message($input = null ) MessageBuilder$
449
448
+defaultRegistry() ProviderRegistry$
450
449
+isConfigured(ProviderAvailabilityInterface $availability) bool$
451
450
+generateResult(string|MessagePart|MessagePart[]|Message|Message[] $prompt, ModelInterface $model) GenerativeAiResult$
@@ -467,62 +466,61 @@ direction LR
467
466
namespace AiClientNamespace.Builders {
468
467
class PromptBuilder {
469
468
+withText(string $text) self
470
- +withInlineImage(string $base64Blob, string $mimeType)
471
- +withRemoteImage(string $uri, string $mimeType)
472
- +withImageFile(File $file) self
473
- +withAudioFile(File $file) self
474
- +withVideoFile(File $file) self
469
+ +withFile($file, ?string $mimeType) self
475
470
+withFunctionResponse(FunctionResponse $functionResponse) self
476
- +withMessageParts(...MessagePart $part ) self
471
+ +withMessageParts(...MessagePart $parts ) self
477
472
+withHistory(...Message $messages) self
478
473
+usingModel(ModelInterface $model) self
474
+ +usingModelConfig(ModelConfig $config) self
475
+ +usingProvider(string $providerIdOrClassName) self
479
476
+usingSystemInstruction(string $systemInstruction) self
480
477
+usingMaxTokens(int $maxTokens) self
481
478
+usingTemperature(float $temperature) self
482
479
+usingTopP(float $topP) self
483
480
+usingTopK(int $topK) self
484
481
+usingStopSequences(...string $stopSequences) self
485
482
+usingCandidateCount(int $candidateCount) self
486
- +usingOutputMime(string $mimeType) self
487
- +usingOutputSchema(array< string, mixed > $schema) self
488
- +usingOutputModalities(...ModalityEnum $modalities) self
483
+ +usingFunctionDeclarations(...FunctionDeclaration $functionDeclarations) self
484
+ +usingPresencePenalty(float $presencePenalty) self
485
+ +usingFrequencyPenalty(float $frequencyPenalty) self
486
+ +usingWebSearch(WebSearch $webSearch) self
487
+ +usingTopLogprobs(?int $topLogprobs) self
488
+ +asOutputMimeType(string $mimeType) self
489
+ +asOutputSchema(array< string, mixed > $schema) self
490
+ +asOutputModalities(...ModalityEnum $modalities) self
491
+ +asOutputFileType(FileTypeEnum $fileType) self
489
492
+asJsonResponse(?array< string, mixed > $schema) self
490
- +generateResult() GenerativeAiResult
491
- +generateOperation() GenerativeAiOperation
493
+ +generateResult(?CapabilityEnum $capability) GenerativeAiResult
492
494
+generateTextResult() GenerativeAiResult
493
- +streamGenerateTextResult() Generator< GenerativeAiResult >
494
495
+generateImageResult() GenerativeAiResult
495
- +convertTextToSpeechResult() GenerativeAiResult
496
496
+generateSpeechResult() GenerativeAiResult
497
- +generateEmbeddingsResult() EmbeddingResult
498
- +generateTextOperation() GenerativeAiOperation
499
- +generateImageOperation() GenerativeAiOperation
500
- +convertTextToSpeechOperation() GenerativeAiOperation
501
- +generateSpeechOperation() GenerativeAiOperation
502
- +generateEmbeddingsOperation() EmbeddingOperation
497
+ +convertTextToSpeechResult() GenerativeAiResult
503
498
+generateText() string
504
499
+generateTexts(?int $candidateCount) string[]
505
- +streamGenerateText() Generator< string >
506
500
+generateImage() File
507
501
+generateImages(?int $candidateCount) File[]
508
502
+convertTextToSpeech() File
509
503
+convertTextToSpeeches(?int $candidateCount) File[]
510
504
+generateSpeech() File
511
505
+generateSpeeches(?int $candidateCount) File[]
512
- +generateEmbeddings() Embedding[]
513
- +getModelRequirements() ModelRequirements
514
- +isSupported() bool
506
+ +isSupportedForTextGeneration() bool
507
+ +isSupportedForImageGeneration() bool
508
+ +isSupportedForTextToSpeechConversion() bool
509
+ +isSupportedForVideoGeneration() bool
510
+ +isSupportedForSpeechGeneration() bool
511
+ +isSupportedForMusicGeneration() bool
512
+ +isSupportedForEmbeddingGeneration() bool
515
513
}
516
514
517
515
class MessageBuilder {
518
- +usingRole(MessageRole $role) self
516
+ +usingRole(MessageRoleEnum $role) self
517
+ +usingUserRole() self
518
+ +usingModelRole() self
519
519
+withText(string $text) self
520
- +withImageFile(File $file) self
521
- +withAudioFile(File $file) self
522
- +withVideoFile(File $file) self
520
+ +withFile($file, ?string $mimeType) self
523
521
+withFunctionCall(FunctionCall $functionCall) self
524
522
+withFunctionResponse(FunctionResponse $functionResponse) self
525
- +withMessageParts(...MessagePart $part ) self
523
+ +withMessageParts(...MessagePart $parts ) self
526
524
+get() Message
527
525
}
528
526
}
0 commit comments