diff --git a/src/GenerationConfig.php b/src/GenerationConfig.php index 6eeaca5..e6c7c0d 100644 --- a/src/GenerationConfig.php +++ b/src/GenerationConfig.php @@ -19,6 +19,7 @@ class GenerationConfig implements JsonSerializable * temperature?: float, * topP?: float, * topK?: int, + * responseMimeType?: string, * } */ private array $config; @@ -97,6 +98,11 @@ public function withTopK(int $topK): self return $clone; } + public function responseMimeType(string $mimeType): self + { + $clone = clone $this; + $clone->config['responseMimeType'] = $mimeType; + /** * @return array{ * candidateCount?: int, @@ -105,6 +111,7 @@ public function withTopK(int $topK): self * temperature?: float, * topP?: float, * topK?: int, + * responseMimeType?: string, * } */ public function jsonSerialize(): array