Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$openai->completion (singular) works where opanai documentation specifies https://api.openai.com/v1/completions (plural) #53

Closed
testgonzo opened this issue Feb 12, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@testgonzo
Copy link

testgonzo commented Feb 12, 2023

Describe the bug

The README places links to OpenAI's reference documentation above the fold (at the very beginning), creating the impression that the library's methods have the same name as the path of the OpenAI endpoints. For example, it may be common for new users of the library to assume Completions are accessed by a method names "completions" such as:

$openai->completion() (spelled singular)

since the linked OpenAI reference documentation for "completions" endpoint describes endpoint as

POST https://api.openai.com/v1/completions (spelled plural)

Yet, the library's method is completion (spelled singular)

$openai->completion() (spelled singular)

This is made clear further down the README, but it's possible many new users will get sidetracked following links to OpenAI's reference and trying to copy the endpoint paths as library method names. Suggest several possible fixes:

  1. At the top of the Readme, calling out the fact method names are described further down the README.

  2. Create a prominent table mapping the OpenAI Reference endpoints to the library's methods.

Thnx

To Reproduce

$openai->completion()

Code snippets

No response

OS

Linux

PHP version

PHP 7.4

Library version

openai v3

@testgonzo testgonzo added the bug Something isn't working label Feb 12, 2023
@orhanerday
Copy link
Owner

Thanks but I'm not sure this is indispensable, but Ill watch the feedback if we get a lot of requests about this feature. I'll take a look. now pr is closing

@orhanerday orhanerday added documentation Improvements or additions to documentation and removed bug Something isn't working labels Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants