Skip to content

Conversation

@raftaar1191
Copy link
Contributor

@raftaar1191 raftaar1191 commented Sep 20, 2025

This PR improves the documentation for the abstract base classes in the OpenAiCompatibleImplementation namespace. The updated docblocks now clearly state that these classes are designed for any provider implementing the OpenAI API format—not just OpenAI, but also Anthropic, Google, and others who offer OpenAI-compatible endpoints.
No functional code changes were made; only comments and docblocks were updated for clarity.
This resolves confusion for contributors and maintainers, making it explicit that these base classes are intended for multi-provider use, following the OpenAI API specification as a standard interface.

Notes:
Used AI assistance to update and clarify the documentation for these base classes. No functional code changes were made.

@github-actions
Copy link

github-actions bot commented Sep 20, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: raftaar1191 <raftaar1191@git.wordpress.org>
Co-authored-by: felixarntz <flixos90@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@raftaar1191 raftaar1191 changed the title Clarify Documentation for OpenAI-Compatible Base Classes Used by Multiple Providers Clarify Documentation for OpenAI-Compatible Base Classes Used by Multiple Providers #95 Sep 20, 2025
Copy link
Member

@felixarntz felixarntz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@raftaar1191 Thank you! LGTM, with some minor iterations.

Great catch on the renamed method!

public function exposePrepareMessagesParamWithSystemInstruction(array $prompt, string $systemInstruction): array
{
return $this->mergeSystemInstruction($prompt, $systemInstruction);
return $this->prepareMessagesParam($prompt, $systemInstruction);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch!

@felixarntz felixarntz added the [Type] Developer Documentation Documentation for developers label Sep 22, 2025
@felixarntz felixarntz merged commit f6b6e8d into WordPress:trunk Sep 22, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Developer Documentation Documentation for developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants