Find answers from the community

Updated 10 months ago

OpenAI has a "System Role" set by

OpenAI has a "System Role" set by default to "You are a helpful assistant." If I directly use the OpenAI API or SDK, I can customize it. When using LlamaIndex with OpenAI as the LLM, is there a way to customize it?
W
S
2 comments
Yes you can customize it like this:
Plain Text
from llama_index.core import Settings
from llama_index.llms.openai import OpenAI
Settings.llm = OpenAI(system_prompt="ADD_YOUR_SYTEM_PROMPT_HERE")
Add a reply
Sign up and join the conversation on Discord