Skip to content

Allow passing other API options like max_completion_tokens #129

Open
@parruda

Description

@parruda

Looks like there's no way to manually set some options for the request parameter, for example, max_completion_tokens, seed, etc (for OpenAI).

It would be great to have a chat.with_options(*options) that would be merged with the result of Providers::[PROVIDER]::Chat#render_payload, so I can chat.with_options(max_completion_tokens: 300). But then it would have to verify that the provider supports that option and raise, which would require the library to keep track of all API options for all providers.

Or maybe it could send the request anyway and inspect the response to find an error message related to an invalid parameter, rescue that and raise as invalid option?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions