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

Feature Request: Support for Multiple Completions in OpenAI API Integration #1408

Open
simonorzel26 opened this issue Apr 22, 2024 · 0 comments
Labels
ai/core enhancement New feature or request

Comments

@simonorzel26
Copy link

simonorzel26 commented Apr 22, 2024

Feature Description

I am interested in expanding the functionality by incorporating multiple completions (i.e., n: 3) from the OpenAI API into a single request. This feature will allow a variety of response suggestions to the user, enhancing their experience by providing multiple dialogue options or content variations from which they can choose.

const response = await openai.createCompletion({
  model: 'gpt-3.5-turbo',
  prompt: 'Your prompt here',
  max_tokens: 150,
  n: 3,  // Requesting three completions
});

Use Case

This adjustment will allow applications to process and render multiple AI-generated responses simultaneously, offering a richer and more interactive experience for suggestive and multiple completions. For instance feedback loops for messages that have better intended use. (One message is less descriptive than the other, so it is saved as history and used in the future for multiple shot prompting)

Additional context

Currently using the render() method, we are very limited to the use.

render({ model: 'gpt-3.5-turbo', provider: openai, initial: <SpinnerMessage />, messages: [

@lgrammel lgrammel added the enhancement New feature or request label May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai/core enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants