File size: 546 Bytes
8157183 2f85c93 8157183 2f85c93 8157183 434b328 967c695 434b328 36dcd43 8157183 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import json
import ollama
from src.manager.utils.streamlit_interface import output_assistant_response
with open("./src/models/models.json", "r", encoding="utf8") as f:
models = f.read()
models = json.loads(models)
for agent in models:
output_assistant_response(f"Deleting agent: {agent}")
try:
ollama.delete(agent)
except Exception as e:
output_assistant_response(f"Error deleting agent {agent}: {e}")
with open("./src/models/models.json", "w", encoding="utf8") as f:
f.write(json.dumps({}, indent=4)) |