Spaces:
Sleeping
Sleeping
Beracles
commited on
Commit
·
42e71ec
1
Parent(s):
441eef9
unify cached command
Browse files
cache.py
CHANGED
|
@@ -23,6 +23,8 @@ def load_cache(filepath: str):
|
|
| 23 |
def add_cache(command: str, result: dict):
|
| 24 |
"""add a cache of ai calling"""
|
| 25 |
command = normalize_text(command)
|
|
|
|
|
|
|
| 26 |
global cache_ai
|
| 27 |
cache_ai[command] = result
|
| 28 |
print(f'[cache] added "{command}"')
|
|
|
|
| 23 |
def add_cache(command: str, result: dict):
|
| 24 |
"""add a cache of ai calling"""
|
| 25 |
command = normalize_text(command)
|
| 26 |
+
result["command"] = command
|
| 27 |
+
|
| 28 |
global cache_ai
|
| 29 |
cache_ai[command] = result
|
| 30 |
print(f'[cache] added "{command}"')
|