Skip to content

Commit e21c4c7

Browse files
committed
fix PHPdoc
1 parent 1a27c64 commit e21c4c7

File tree

7 files changed

+11
-34
lines changed

7 files changed

+11
-34
lines changed

src/AbstractProvider.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ abstract class AbstractProvider implements ProviderInterface
5858
* @throws \InvalidArgumentException
5959
* @since ___DEPLOY_VERSION___
6060
*/
61-
public function __construct(array $options = [], ?HttpFactory $httpFactory = null)
61+
public function __construct($options = [], ?HttpFactory $httpFactory = null)
6262
{
6363
// Validate provider is suported
6464
if (!\is_array($options) && !($options instanceof \ArrayAccess)) {
@@ -340,9 +340,9 @@ protected function getExtensionFromMimeType(string $mimeType): string
340340
}
341341

342342
/**
343-
* Get audio MIME type from file path.
343+
* Get audio MIME type from the input.
344344
*
345-
* @param string $filepath The file path
345+
* @param string $input
346346
*
347347
* @return string The MIME type
348348
* @since __DEPLOY_VERSION__

src/Exception/QuotaExceededException.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,11 @@ class QuotaExceededException extends AIException
2020
* Constructor.
2121
*
2222
* @param string $provider The AI provider name
23-
* @param string $message The error message
24-
* @param array $context Additional context data
2523
* @param int|null $httpStatusCode The actual HTTP status code from response
26-
* @param string|null $providerErrorCode The provider-specific error code
2724
*
2825
* @since __DEPLOY_VERSION__
2926
*/
30-
public function __construct(string $provider, array $errorData, int $httpStatusCode)
27+
public function __construct(string $provider, array $errorData, $httpStatusCode)
3128
{
3229
$context = ['error_data' => $errorData];
3330
$providerErrorCode = $errorData['code'] ?? $errorData['error']['code'] ?? null;

src/Exception/RateLimitException.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,12 @@ class RateLimitException extends AIException
2020
* Constructor.
2121
*
2222
* @param string $provider The AI provider name
23-
* @param string $message The error message
24-
* @param array $context Additional context data
23+
* @param array $errorData Additional error data
2524
* @param int|null $httpStatusCode The actual HTTP status code from response
26-
* @param string|null $providerErrorCode The provider-specific error code
2725
*
2826
* @since __DEPLOY_VERSION__
2927
*/
30-
public function __construct(string $provider, array $errorData, int $httpStatusCode)
28+
public function __construct(string $provider, array $errorData, $httpStatusCode)
3129
{
3230
$context = ['error_data' => $errorData];
3331
$providerErrorCode = $errorData['code'] ?? $errorData['error']['code'] ?? null;

src/Interface/AudioInterface.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ interface AudioInterface
2222
* Generate speech audio from text input.
2323
*
2424
* @param string $text The text to convert to speech
25-
* @param string $model The TTS model to use for speech generation
26-
* @param string $voice The voice to use for speech generation
2725
* @param array $options Additional options for speech generation
2826
*
2927
* @return Response
@@ -59,7 +57,6 @@ public function getSupportedAudioFormats(): array;
5957
* Transcribe audio to text.
6058
*
6159
* @param string $audioFile Path to the audio file to transcribe
62-
* @param string $model The transcription model to use
6360
* @param array $options Additional options for transcription
6461
*
6562
* @return Response
@@ -71,7 +68,6 @@ public function transcribe(string $audioFile, array $options = []): Response;
7168
* Translate audio to English text.
7269
*
7370
* @param string $audioFile Path to audio file to translate
74-
* @param string $model Model to use for translation
7571
* @param array $options Additional options
7672
*
7773
* @return Response

src/Provider/AnthropicProvider.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class AnthropicProvider extends AbstractProvider implements ProviderInterface, C
4242
*
4343
* @since __DEPLOY_VERSION__
4444
*/
45-
public function __construct(array $options = [], ?HttpFactory $httpFactory = null)
45+
public function __construct($options = [], ?HttpFactory $httpFactory = null)
4646
{
4747
parent::__construct($options, $httpFactory);
4848

@@ -143,9 +143,7 @@ private function getModelsEndpoint(): string
143143
/**
144144
* List available models from Anthropic.
145145
*
146-
* @param array $options Optional parameters for the request
147-
*
148-
* @return Response The response containing model list
146+
* @return array
149147
* @since __DEPLOY_VERSION__
150148
*/
151149
public function getAvailableModels(): array

src/Provider/OllamaProvider.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class OllamaProvider extends AbstractProvider
3232
*
3333
* @since __DEPLOY_VERSION__
3434
*/
35-
public function __construct(array $options = [], ?HttpFactory $httpFactory = null)
35+
public function __construct($options = [], ?HttpFactory $httpFactory = null)
3636
{
3737
parent::__construct($options, $httpFactory);
3838

@@ -165,7 +165,6 @@ public function getAvailableModels(): array
165165
/**
166166
* List models currently loaded into memory (running) and echo their names.
167167
*
168-
* @return array Array of running model info
169168
* @throws ProviderException If the request fails
170169
* @since __DEPLOY_VERSION__
171170
*/
@@ -319,7 +318,6 @@ public function deleteModel(string $modelName): bool
319318
* @param bool $stream Whether to stream the response (for progress updates)
320319
* @param bool $insecure Allow insecure connections to the library
321320
*
322-
* @return bool True if model was pulled successfully
323321
* @throws InvalidArgumentException If model doesn't exist in Ollama library
324322
* @throws ProviderException If pull fails for other reasons
325323
* @since __DEPLOY_VERSION__
@@ -626,7 +624,7 @@ public function buildGenerateRequestPayload(string $prompt, array $options = [])
626624
*
627625
* @param string $prompt The prompt to generate a response for
628626
* @param array $options Additional options
629-
* @param callable $callback Optional callback function for streaming responses
627+
*
630628
* @return Response The AI response
631629
* @throws ProviderException If the request fails
632630
* @since __DEPLOY_VERSION__

src/Provider/OpenAIProvider.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class OpenAIProvider extends AbstractProvider implements ChatInterface, ModelInt
124124
*
125125
* @since __DEPLOY_VERSION__
126126
*/
127-
public function __construct(array $options = [], ?HttpFactory $httpFactory = null)
127+
public function __construct($options = [], ?HttpFactory $httpFactory = null)
128128
{
129129
parent::__construct($options, $httpFactory);
130130

@@ -573,8 +573,6 @@ public function editImage($images, string $prompt, array $options = []): Respons
573573
* Generate speech audio from text input.
574574
*
575575
* @param string $text The text to convert to speech
576-
* @param string $model The model to use for speech synthesis
577-
* @param string $voice The voice to use for speech synthesis
578576
* @param array $options Additional options for speech generation
579577
*
580578
* @return Response
@@ -602,7 +600,6 @@ public function speech(string $text, array $options = []): Response
602600
* Transcribe audio into text.
603601
*
604602
* @param string $audioFile Path to audio file
605-
* @param string $model The transcription model to use
606603
* @param array $options Additional options for transcription
607604
*
608605
* @return Response The AI response containing transcribed text
@@ -627,7 +624,6 @@ public function transcribe(string $audioFile, array $options = []): Response
627624
* Translate audio to English text.
628625
*
629626
* @param string $audioFile Path to audio file
630-
* @param string $model Model to use for translation
631627
* @param array $options Additional options
632628
*
633629
* @return Response Translation response
@@ -722,7 +718,6 @@ public function moderate($input, array $options = []): array
722718
* @param array $moderationResult Result from moderate() method
723719
*
724720
* @return bool
725-
* @throws \InvalidArgumentException
726721
* @since __DEPLOY_VERSION__
727722
*/
728723
public function isContentFlagged(array $moderationResult): bool
@@ -909,7 +904,6 @@ private function buildVisionRequestPayload(string $message, string $image, strin
909904
*
910905
* @param string $prompt The image generation prompt.
911906
* @param array $options Additional options for the request.
912-
* @param string $capability Required capability.
913907
*
914908
* @return array The request payload.
915909
* @since __DEPLOY_VERSION__
@@ -1194,8 +1188,6 @@ private function buildImageEditPayload($images, string $prompt, array $options):
11941188
* Build payload for text-to-speech request.
11951189
*
11961190
* @param string $text The text to convert to speech
1197-
* @param string $model The model to use for speech synthesis
1198-
* @param string $voice The voice to use for speech synthesis
11991191
* @param array $options Additional options for speech generation
12001192
*
12011193
* @return array The request payload.
@@ -1268,7 +1260,6 @@ private function buildSpeechPayload(string $text, array $options): array
12681260
* Build payload for transcription request.
12691261
*
12701262
* @param string $audioFile The audio file
1271-
* @param string $model The transcription model
12721263
* @param array $options Additional options
12731264
*
12741265
* @return array Form data for multipart request
@@ -1378,7 +1369,6 @@ private function buildTranscriptionPayload(string $audioFile, array $options): a
13781369
* Build payload for translation request.
13791370
*
13801371
* @param string $audioFile Path to the audio file
1381-
* @param string $model The translation model to use
13821372
* @param array $options Additional options for translation
13831373
*
13841374
* @return array Form data for multipart request

0 commit comments

Comments
 (0)