docs/examples/chat_engine/chat_engine_personality.ipynb
<a href="https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/chat_engine/chat_engine_personality.ipynb" target="_parent"></a>
If you're opening this Notebook on colab, you will probably need to install LlamaIndex 🦙.
!pip install llama-index
from llama_index.core.chat_engine import SimpleChatEngine
chat_engine = SimpleChatEngine.from_defaults()
response = chat_engine.chat(
"Say something profound and romantic about fourth of July"
)
print(response)
from llama_index.core.chat_engine import SimpleChatEngine
from llama_index.core.prompts.system import SHAKESPEARE_WRITING_ASSISTANT
chat_engine = SimpleChatEngine.from_defaults(
system_prompt=SHAKESPEARE_WRITING_ASSISTANT
)
response = chat_engine.chat(
"Say something profound and romantic about fourth of July"
)
print(response)
from llama_index.core.chat_engine import SimpleChatEngine
from llama_index.core.prompts.system import MARKETING_WRITING_ASSISTANT
chat_engine = SimpleChatEngine.from_defaults(
system_prompt=MARKETING_WRITING_ASSISTANT
)
response = chat_engine.chat(
"Say something profound and romantic about fourth of July"
)
print(response)
from llama_index.core.chat_engine import SimpleChatEngine
from llama_index.core.prompts.system import IRS_TAX_CHATBOT
chat_engine = SimpleChatEngine.from_defaults(system_prompt=IRS_TAX_CHATBOT)
response = chat_engine.chat(
"Say something profound and romantic about fourth of July"
)
print(response)