Converter of popular culture texts to emoji
The get_emoji
function is a function that takes in a piece of text and an optional parameter called max_tokens. It uses the OpenAI API to generate a text completion based on a prompt that includes a list of different texts and their corresponding emojis, followed by the input text and a colon.
The max_tokens
parameter determines the maximum number of tokens (i.e. words or word-like units) that the generated text completion can have. The function also sets some other parameters for the text completion, such as the temperature, top_p, frequency penalty, presence penalty, and stop, which control the style and content of the generated text. Finally, the function returns the text completion generated by the OpenAI API.
Install emojex module:
pip install emojex
Do you would like to contribute? Do you want to be the author of a new feature? Awesome! please fork the repository and make changes as you like. Pull requests are warmly welcome.
Distributed under the MIT License.
See LICENSE
for more information.