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

Content Filter Endpoint #9

Closed
mrandrewjbaker opened this issue Dec 12, 2020 · 2 comments
Closed

Content Filter Endpoint #9

mrandrewjbaker opened this issue Dec 12, 2020 · 2 comments

Comments

@mrandrewjbaker
Copy link

mrandrewjbaker commented Dec 12, 2020

I was wondering if it is possible to use the content filter with the complete function?

https://beta.openai.com/docs/content-filter
According to the documentation, you should be able to just reference the engine and set the options, see example.

Example;

contentFilter: async function(prompt){
            let gpt3_options = {
                prompt: prompt,
                engine: 'content-filter-alpha-c4',
                maxTokens: 1,
                temperature: 0.0,
                topP: 0

            }

            let gpt3_repsonse = await openai.complete(gpt3_options)
            return await gpt3_response
}

Error;

UnhandledPromiseRejectionWarning: Error: Request failed with status code 400
@mrandrewjbaker
Copy link
Author

Nevermind, all works as supposed to. I was referencing the wrong function.

@manish-10
Copy link

can you post the solution? I am facing the same issue.

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

No branches or pull requests

2 participants