@@ -118,11 +118,11 @@ public function doesNotSupportNonGPTModel(): void
118118 }
119119
120120 #[Test]
121- #[TestWith([['messages ' => [['role ' => 'user ' , 'content ' => 'Hello ' ]], 'model ' => 'gpt-3.5-turbo ' ], [], ['messages ' => [['role ' => 'user ' , 'content ' => 'Hello ' ]], 'model ' => 'gpt-3.5-turbo ' ]], 'with array payload and no options ' )]
122- #[TestWith(['test message ' , [], 'test message ' ], 'with string payload and no options ' )]
123- #[TestWith([['messages ' => [['role ' => 'user ' , 'content ' => 'Hello ' ]], 'model ' => 'gpt-3.5-turbo ' ], ['temperature ' => 0.7 , 'max_tokens ' => 150 ], ['messages ' => [['role ' => 'user ' , 'content ' => 'Hello ' ]], 'model ' => 'gpt-3.5-turbo ' , 'temperature ' => 0.7 , 'max_tokens ' => 150 ]], 'with array payload and options ' )]
124- #[TestWith([['messages ' => [['role ' => 'user ' , 'content ' => 'Hello ' ]], 'model ' => 'gpt-3.5-turbo ' , 'temperature ' => 1.0 ], ['temperature ' => 0.5 ], ['messages ' => [['role ' => 'user ' , 'content ' => 'Hello ' ]], 'model ' => 'gpt-3.5-turbo ' , 'temperature ' => 0.5 ]], 'options override payload values ' )]
125- #[TestWith([['messages ' => [['role ' => 'user ' , 'content ' => 'Hello ' ]], 'model ' => 'gpt-3.5-turbo ' ], ['stream ' => true ], ['messages ' => [['role ' => 'user ' , 'content ' => 'Hello ' ]], 'model ' => 'gpt-3.5-turbo ' , 'stream ' => true ]], 'with streaming option ' )]
121+ #[TestWith([['messages ' => [['role ' => 'user ' , 'content ' => 'Hello ' ]], 'model ' => 'gpt-3.5-turbo ' ], [], ['messages ' => [['role ' => 'user ' , 'content ' => 'Hello ' ]], 'model ' => 'gpt-3.5-turbo ' ]], name: 'with array payload and no options ' )]
122+ #[TestWith(['test message ' , [], 'test message ' ], name: 'with string payload and no options ' )]
123+ #[TestWith([['messages ' => [['role ' => 'user ' , 'content ' => 'Hello ' ]], 'model ' => 'gpt-3.5-turbo ' ], ['temperature ' => 0.7 , 'max_tokens ' => 150 ], ['messages ' => [['role ' => 'user ' , 'content ' => 'Hello ' ]], 'model ' => 'gpt-3.5-turbo ' , 'temperature ' => 0.7 , 'max_tokens ' => 150 ]], name: 'with array payload and options ' )]
124+ #[TestWith([['messages ' => [['role ' => 'user ' , 'content ' => 'Hello ' ]], 'model ' => 'gpt-3.5-turbo ' , 'temperature ' => 1.0 ], ['temperature ' => 0.5 ], ['messages ' => [['role ' => 'user ' , 'content ' => 'Hello ' ]], 'model ' => 'gpt-3.5-turbo ' , 'temperature ' => 0.5 ]], name: 'options override payload values ' )]
125+ #[TestWith([['messages ' => [['role ' => 'user ' , 'content ' => 'Hello ' ]], 'model ' => 'gpt-3.5-turbo ' ], ['stream ' => true ], ['messages ' => [['role ' => 'user ' , 'content ' => 'Hello ' ]], 'model ' => 'gpt-3.5-turbo ' , 'stream ' => true ]], name: 'with streaming option ' )]
126126 public function requestSendsCorrectHttpRequest (array |string $ payload , array $ options , array |string $ expectedJson ): void
127127 {
128128 $ capturedRequest = null ;
@@ -135,7 +135,7 @@ public function requestSendsCorrectHttpRequest(array|string $payload, array $opt
135135 $ client = new GPTModelClient (
136136 $ httpClient ,
137137 'test-api-key ' ,
138- 'https://albert.example.com/v1/ '
138+ 'https://albert.example.com/v1 '
139139 );
140140
141141 $ model = new GPT ('gpt-3.5-turbo ' );
@@ -193,7 +193,7 @@ public function requestHandlesBaseUrlWithTrailingSlash(): void
193193 $ client = new GPTModelClient (
194194 $ httpClient ,
195195 'test-api-key ' ,
196- 'https://albert.example.com/v1/ '
196+ 'https://albert.example.com/v1 '
197197 );
198198
199199 $ model = new GPT ('gpt-3.5-turbo ' );
0 commit comments