i want to dynamicly change system_instruction after model initialisation but, i can’t find any examples, Help
This code does not work
model = genai.GenerativeModel(
system_instruction="You are a helpful assistant. Never use emojis. You can save files using functions!",
model_name='gemini-1.5-flash-latest', # Choose your desired Gemini model
safety_settings={'HARASSMENT': 'block_none'},
)
def main():
from GEMINI_IMPROVED import tool_manager as tool_manager
system_instruction= """
You are a helpful assistant. Never use emojis. You can save files using functions!
Always remember the user's first request and use it to guide your actions and responses.
You should never use emojis in your responses. "
You have access to the following tools: directory_report, execute_script, save_to_file.
Use these tools appropriately to assist the user."""
chat_session = model.start_chat(history=[],system_instruction=system_instruction)