ChatGPT Aliases Should Search for Keyword Within the Prompt, Instead of the Other Way Around
Sponge-bink opened this issue · 1 comments
Is your feature request related to a problem? Please describe.
In the case of using a prompt again and again, the prompt usually is used to explain a task for processing other text. ChatGPT aliases should work like it will search for the keyword in the prompt, instead of searching for a full match to see if the original prompt is a key as is in the aliases_dict
Describe the solution you'd like
I'm using the following ChatGPT aliases:
EEE=Please provide the English translation for these sentences:;JJJ=Please provide the Japanese translation for these sentences:;CCC=Please provide the Mandarin Chinese translation for these sentences:
And I hope when I type EEE こんにちは
ChatFred will actually send Please provide the English translation for these sentences: こんにちは
to ChatGPT instead of doing nothing because EEE こんにちは
itself is not a keyword.
Describe alternatives you've considered
Instead of
aliases_dict = __prepare_aliases()
if prompt in aliases_dict:
return aliases_dict[prompt]
return prompt
in file workflow/src/aliases_manager.py, my tested and suggested code:
aliases_dict = __prepare_aliases()
for k, v in aliases_dict.items():
prompt = prompt.replace(k, v)
return prompt
Hey @Sponge-bink!
Maybe you want to create a PR for this too?