Skip to content

Commit f6b6e8d

Browse files
authored
Merge pull request #97 from raftaar1191/issue-95
Clarify Documentation for OpenAI-Compatible Base Classes Used by Multiple Providers #95
2 parents c94ac9c + eb11ada commit f6b6e8d

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

src/Providers/OpenAiCompatibleImplementation/AbstractOpenAiCompatibleImageGenerationModel.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@
2424
use WordPress\AiClient\Results\Enums\FinishReasonEnum;
2525

2626
/**
27-
* Base class for an image generation model for an OpenAI compatible provider.
27+
* Base class for an image generation model for providers that implement OpenAI's API format.
28+
*
29+
* This abstract class is designed to work with any AI provider that offers an OpenAI-compatible
30+
* API endpoint for image generation, including but not limited to Anthropic, Google, and other
31+
* providers that have adopted OpenAI's image generation API specification as a standard interface.
2832
*
2933
* @since 0.1.0
3034
*

src/Providers/OpenAiCompatibleImplementation/AbstractOpenAiCompatibleModelMetadataDirectory.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313
use WordPress\AiClient\Providers\Models\DTO\ModelMetadata;
1414

1515
/**
16-
* Base class for a model metadata directory for an OpenAI compatible provider.
16+
* Base class for a model metadata directory for providers that implement OpenAI's API format.
17+
*
18+
* This abstract class is designed to work with any AI provider that offers an OpenAI-compatible
19+
* models listing endpoint, including but not limited to Anthropic, Google, and other
20+
* providers that have adopted OpenAI's models API specification as a standard interface.
1721
*
1822
* @since 0.1.0
1923
*/

src/Providers/OpenAiCompatibleImplementation/AbstractOpenAiCompatibleTextGenerationModel.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@
2727
use WordPress\AiClient\Tools\DTO\FunctionDeclaration;
2828

2929
/**
30-
* Base class for a text generation model for an OpenAI compatible provider.
30+
* Base class for a text generation model for providers that implement OpenAI's API format.
31+
*
32+
* This abstract class is designed to work with any AI provider that offers an OpenAI-compatible
33+
* API endpoint, including but not limited to Anthropic, Google, and other providers
34+
* that have adopted OpenAI's API specification as a standard interface.
3135
*
3236
* @since 0.1.0
3337
*

tests/unit/Providers/OpenAiCompatibleImplementation/MockOpenAiCompatibleTextGenerationModel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ public function exposePrepareGenerateTextParams(array $prompt): array
113113
return $this->prepareGenerateTextParams($prompt);
114114
}
115115

116-
public function exposeMergeSystemInstruction(array $prompt, string $systemInstruction): array
116+
public function exposePrepareMessagesParamWithSystemInstruction(array $prompt, string $systemInstruction): array
117117
{
118-
return $this->mergeSystemInstruction($prompt, $systemInstruction);
118+
return $this->prepareMessagesParam($prompt, $systemInstruction);
119119
}
120120

121121
public function exposePrepareMessagesParam(array $messages): array

0 commit comments

Comments
 (0)