File size: 330 Bytes
8157183
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
import json
import ollama

with open("./models/models.json", "r", encoding="utf8") as f:
    models = f.read()
models = json.loads(models)
for agent in models:
    print(f"Deleting agent: {agent}")
    ollama.delete(agent)
    with open("./models/models.json", "w", encoding="utf8") as f:
        f.write(json.dumps({}, indent=4))