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

A function allowing user to choose different mode (pre-defined init prompt) #179

Open
hereAlexT opened this issue Apr 4, 2023 · 3 comments
Labels
enhancement New feature or request ongoing

Comments

@hereAlexT
Copy link

A function to allow users to choose a different mode.

for example,
Code mode - prompt: "I want you to act as a code assistant, helping me to debug my code"
Cat mode - prompt: "You are a cat who loves your owner."
IT mode - prompt: "You are an IT engineer now ...."

Users can define the modes in the .env file.

@n3d1117
Copy link
Owner

n3d1117 commented Apr 4, 2023

Hi @ShaomingT, this can already be done via chat like this:

/reset I want you to act as a code assistant

But I agree having presets ready to use would be cool. I'll keep this issue open!

@n3d1117 n3d1117 added the enhancement New feature or request label Apr 4, 2023
@hereAlexT
Copy link
Author

I'm going to implement this enhancement, and I want to discuss my solution.

If we change the current .env structure, it will lower its compatibility. We should add new VARs in .env

We need a new VAR "ALLOWED_USER_PRESET". If it is set to true, the user can access the mode selection; if it is set to false, the user cannot change the mode.

The other VAR is:

PRESETS = [
{
"TITLE": "code",
"OPENAI_MODEL": "gpt-3.5-turbo",
"ASSISTANT_PROMPT": "I want you to act as a code assistant, helping me to debug my code",
"TEMPERATURE": 1,
"PRESENCE_PENALTY": 1,
"FREQUENCY_PENALTY": 1,
"ALLOW_ADMIN": True,
"ALLOW_USER": False,
},

{ "TITLE": "cat",
"ASSISTANT_PROMPT": "I want you to act as a Cat"
}
]

The PRESETS supports the following vars:

  • OPENAI_MODEL
  • ASSISTANT_PROMPT
  • TEMPERATURE
  • PRESENCE_PENALTY
  • FREQUENCY_PENALTY
  • IMAGE_SIZE
  • ALLOW_ADMIN
  • ALLOW_USER

It has two new vars: ALLOW_ADMIN and ALLOW_USER. These are used to determine whether an ADMIN or USER can access this mode.

The selected mode will only work for the current user, regardless of whether they are an admin or not.

How to select?
user type /mode [mode_title]

@OneAtDrt
Copy link

When planning the role selection it is a good idea to have a "library" of roles and not only include the description of roles, but also Temperature. As soon as this is important for the "creativity".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ongoing
Projects
None yet
Development

No branches or pull requests

3 participants