Resolve #3501907 "Improve checks for"
1 unresolved thread
Closes #3501907
Merge request reports
Activity
Filter activity
- src/OpenAiHelper.php 0 → 100644
23 public function __construct( 24 private readonly MessengerInterface $messenger, 25 ) { 26 } 27 28 /** 29 * Check the rate limit and create a warning message if its free tier. 30 * 31 * @param string $api_key 32 * The API Key. 33 */ 34 public function testRateLimit(string $api_key) { 35 $headers = []; 36 37 // Create a Guzzle client with a handler to capture response headers. 38 $guzzle = new Client([ We could inject service from http_client, however that is already created, so the middleware for TransferStats will not work to inject. In theory I could add it for that one call, but that seems overkill?
If we add proxy, custom time out etc services in the future we should use the HTTP Client Manager as a requirement, but that wouldn't happen before 2.0.x since its breaking.
Please register or sign in to reply