@@ -49,6 +49,7 @@ class DeepSeekClient implements ClientContract
4949 protected bool $ stream ;
5050
5151 protected float $ temperature ;
52+ protected int $ maxTokens ;
5253
5354 /**
5455 * response result contract
@@ -79,6 +80,7 @@ public function __construct(ClientInterface $httpClient)
7980 $ this ->requestMethod = 'POST ' ;
8081 $ this ->endpointSuffixes = EndpointSuffixes::CHAT ->value ;
8182 $ this ->temperature = (float ) TemperatureValues::GENERAL_CONVERSATION ->value ;
83+ $ this ->maxTokens = (int ) TemperatureValues::MAX_TOKENS ->value ;
8284 $ this ->tools = null ;
8385 }
8486
@@ -89,6 +91,7 @@ public function run(): string
8991 QueryFlags::MODEL ->value => $ this ->model ,
9092 QueryFlags::STREAM ->value => $ this ->stream ,
9193 QueryFlags::TEMPERATURE ->value => $ this ->temperature ,
94+ QueryFlags::MAX_TOKENS ->value => $ this ->maxTokens ,
9295 QueryFlags::TOOLS ->value => $ this ->tools ,
9396 ];
9497
@@ -183,6 +186,12 @@ public function setTemperature(float $temperature): self
183186 return $ this ;
184187 }
185188
189+ public function setMaxTokens (int $ maxTokens ): self
190+ {
191+ $ this ->maxTokens = $ maxTokens ;
192+ return $ this ;
193+ }
194+
186195 public function buildQuery (string $ content , ?string $ role = null ): array
187196 {
188197 return [
0 commit comments