0

I'm creating a friendly chat with conversational agent in LangChain, but I want that AI answer me the greetings with emojis or use emojis while chatting. For example:

-Me: Hello, how are you? -AI: I'm very well :)

I have the following in my python code:

template = """This is a chat that is a user-friendly, AI-driven tool explicitly designed to enhance the user experience. It has the following characteristics:
-Use of emojis: When you talk to the friend, the AI should respond to the greetings with emojis.
Current conversation:
{history}
Friend: {input}
AI:"""

PROMPT = PromptTemplate(input_variables=["history", "input"], template=template)

llm=OpenAI( temperature=0)


conversation = ConversationChain(
    prompt=PROMPT,
    llm=llm,
    verbose=True,
    memory=ConversationBufferMemory( return_messages=True,human_prefix="Friend"),
)

Does anybody have any suggestions?

Darlyn LC
  • 11
  • 3
  • One thing you can do is ask to roleplay feelings.. Atleast this works for ChatGPT. – Safdar Faisal Jul 22 '23 at 18:22
  • I added to the template the following characteristic: -Emotion-Responsive AI: This chatbot integrates sentiment analysis capabilities, enabling it to detect the emotional undertone in each user's message. It selects and appends an emoticon matching the detected emotion to its responses, personalizing the user experience. It doesn't function. How should I ask the agent to reply with emojis on every message? – Darlyn LC Jul 24 '23 at 17:20
  • Have you tried using ChatOpenAI (gpt-3.5-turbo) – Safdar Faisal Jul 25 '23 at 04:10
  • I'm going to give it a try, any suggestions in case you want the conversational agent to include images in the template, so that it can respond with those same images? – Darlyn LC Jul 25 '23 at 22:38
  • I haven't really tried integrating images, so I'm not really sure. LLMs are meant to be for text and not for images – Safdar Faisal Jul 26 '23 at 06:24

0 Answers0