fix: replace uuid.uuid4() with getID() from appPublic.uniqueID for all table ID generation
This commit is contained in:
parent
9597cfa7b8
commit
518f174926
Binary file not shown.
Binary file not shown.
@ -1,6 +1,7 @@
|
|||||||
from typing import Dict, Any
|
from typing import Dict, Any
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import uuid
|
import uuid
|
||||||
|
from appPublic.uniqueID import getID
|
||||||
|
|
||||||
|
|
||||||
async def hermes_get_reasoning_config(context: Dict[str, Any]) -> Dict[str, Any]:
|
async def hermes_get_reasoning_config(context: Dict[str, Any]) -> Dict[str, Any]:
|
||||||
@ -100,7 +101,7 @@ async def hermes_save_reasoning_config(context: Dict[str, Any], config_data: Dic
|
|||||||
await engine.db.sql(sql_update, config_data)
|
await engine.db.sql(sql_update, config_data)
|
||||||
else:
|
else:
|
||||||
# Create new config
|
# Create new config
|
||||||
config_data["id"] = str(uuid.uuid4()).replace("-", "")[:32]
|
config_data["id"] = getID()[:32]
|
||||||
config_data["created_at"] = config_data["updated_at"]
|
config_data["created_at"] = config_data["updated_at"]
|
||||||
sql_insert = """
|
sql_insert = """
|
||||||
INSERT INTO harnessed_reasoning_config (
|
INSERT INTO harnessed_reasoning_config (
|
||||||
|
|||||||
@ -5,6 +5,7 @@ task planning, and tool coordination.
|
|||||||
"""
|
"""
|
||||||
import json
|
import json
|
||||||
import uuid
|
import uuid
|
||||||
|
from appPublic.uniqueID import getID
|
||||||
import time
|
import time
|
||||||
from typing import Dict, Any, List, Optional
|
from typing import Dict, Any, List, Optional
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
@ -432,7 +433,7 @@ class HermesReasoningEngine:
|
|||||||
5. Store session and return result
|
5. Store session and return result
|
||||||
"""
|
"""
|
||||||
start_time = time.time()
|
start_time = time.time()
|
||||||
session_id = str(uuid.uuid4())
|
session_id = getID()
|
||||||
|
|
||||||
if not user_id:
|
if not user_id:
|
||||||
user_id = "anonymous"
|
user_id = "anonymous"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user