Skip to content
New issue

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

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

Already on GitHub? # to your account

change parameters like temperature? #29

Closed
potaslab opened this issue Apr 15, 2023 · 3 comments
Closed

change parameters like temperature? #29

potaslab opened this issue Apr 15, 2023 · 3 comments

Comments

@potaslab
Copy link

Is it possible to change the temperature? How could we do that?

@algunion
Copy link
Contributor

It is as simple as adding additional keyword arguments.

Here is an example for completion:

create_completion(
    ENV["OPENAI_API_KEY"],
    "text-ada-001";
    prompt="Oranges are...",
    temperature=0.5
  )

The only exception is for stream, where instead of using stream=true, you should provide a streamcallback function to manage the received chunks (and that, in turn, will set stream=true).

Until we get proper documentation, I also suggest looking at the tests. However, the tests are not showcasing the usage of the additional parameters - so feel free to continue addressing questions here if the basic test examples are not covering something.

@roryl23
Copy link
Collaborator

roryl23 commented Apr 15, 2023

I'm working on getting Documenter.jl set up now

@logankilpatrick
Copy link
Member

Done via the docs now: https://juliaml.github.io/OpenAI.jl/dev/

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants