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

Is create_completion missing arguments? #36

Open
potaslab opened this issue Apr 26, 2023 · 6 comments
Open

Is create_completion missing arguments? #36

potaslab opened this issue Apr 26, 2023 · 6 comments
Labels
wontfix This will not be worked on

Comments

@potaslab
Copy link

I hope this isn't a silly question, but is create_completion missing an argument for including a prompt? Or is it possible to provide an example of how to create a completion for a prompt? Apologies if I am missing something.

@algunion
Copy link
Contributor

algunion commented Apr 27, 2023

Hey @potaslab ,

Here you have an example:

the_prompt = "Explain Julia metaprogramming in about 10 words."

create_completion(
                 ENV["OPENAI_API_KEY"],
                 "text-davinci-003";
                 prompt=the_prompt 
               )

Here you can see it in action:

image

@algunion
Copy link
Contributor

@potaslab,

I think I understand what you mean by "missing" - the prompt is missing in the sense that it is a keyword argument (thus technically not required).

Although the example above works well, the prompt argument should be mandatory and obvious from the method signature.

@potaslab
Copy link
Author

potaslab commented Apr 27, 2023

Thanks for the example. I wasn't able to work that out from the documentation. I think that example would greatly help others if it were in the documentation, especially since some of the models work with create_completion() and not create_chat(), and vise versa.

Also, thanks for your hard work, its greatly appreciated!

@svilupp
Copy link
Contributor

svilupp commented Nov 19, 2023

I do agree that we should create a separate issue for adding some examples (incl. for the new OpenAI functionality), but perhaps this issue can be closed now?

@cpfiffer
Copy link
Collaborator

cpfiffer commented Dec 1, 2023

I would prefer to tag this as a won't-fix, particularly since the completions API is now legacy and is slated for deprecation.

@cpfiffer
Copy link
Collaborator

cpfiffer commented Dec 1, 2023

We may also wish to consider deprecating those functions so that users can transition to the chat API instead.

@roryl23 roryl23 added wontfix This will not be worked on labels May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

5 participants