ChatServices¶
- chat.services.checking_sentences.chekicg_sentences(prompt)[source]¶
The text_generator function takes a string as an argument and returns the same string with any spelling errors corrected.
- Parameters:
prompt – Pass the text that needs to be corrected
- Returns:
The corrected text
- chat.services.conversation.chat_bot(messages)[source]¶
The text_generator function takes in a list of messages and returns the role (speaker) and content (message) of the first response from OpenAI’s GPT-3 API. The function is used to generate responses to user input.
- Parameters:
messages – A list of messages that the chatbot has received, including the user’s input.
- Returns:
A tuple of the role and content
- chat.services.translate.translate(language, prompt)[source]¶
Translate the text from one language to another.
- Parameters:
language – The language to which the text should be translated
prompt – The text that needs to be translated
- Returns:
The translated text