Skip to content
This repository has been archived by the owner on Dec 3, 2022. It is now read-only.

Some parameters in the client.completion(... etc not passed on to the session call #4

Closed
paulostergaard opened this issue Oct 15, 2021 · 1 comment · Fixed by #5
Closed

Comments

@paulostergaard
Copy link

paulostergaard commented Oct 15, 2021

Hi - I want to set the presencePenalty and frequencyPenalty parameters to my own custom values, but they don't seem to be carried forward into the parameters flatmap before the session call.

The parameters exposed in the high level client method completions that should ideally be carried through in to the URL session call.

e.g.:

Parameters in client.completion():

 presencePenalty: Double? = nil,
 frequencyPenalty: Double? = nil,
 bestOf: Int? = nil,

Not used in:

var parameters: [String: Any?] = [
            "prompt": prompt,
            "max_tokens": numberOfTokens?.upperBound,
            "user": user,
            "n": numberOfCompletions,
            "echo": echo,
            "stop": stop
/// missing penalty and bestOf parameters ideally added here...
        ]

Net result is that you think you are changing certain values in the call to client.completions(), but in reality they aren't getting changed.

@mattt
Copy link
Owner

mattt commented Oct 19, 2021

Thanks for pointing this out, @paulostergaard. This is fixed in the latest version (0.1.3).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants