Skip to content

Commit 2b8d640

Browse files
authored
Update sql_storage.py
table name update to "modelcache_llm_answer"
1 parent 5277b72 commit 2b8d640

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modelcache/manager/scalar_data/sql_storage.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def _insert(self, data: List):
4343
embedding_data = embedding_data.tobytes()
4444
is_deleted = 0
4545

46-
table_name = "cache_codegpt_answer"
46+
table_name = "modelcache_llm_answer"
4747
insert_sql = "INSERT INTO {} (question, answer, answer_type, model, embedding_data, is_deleted) VALUES (%s, %s, %s, %s, _binary%s, %s)".format(table_name)
4848
conn = self.pool.connection()
4949
try:
@@ -91,7 +91,7 @@ def insert_query_resp(self, query_resp, **kwargs):
9191
conn.close()
9292

9393
def get_data_by_id(self, key: int):
94-
table_name = "cache_codegpt_answer"
94+
table_name = "modelcache_llm_answer"
9595
query_sql = "select question, answer, embedding_data, model from {} where id={}".format(table_name, key)
9696
conn_start = time.time()
9797
conn = self.pool.connection()
@@ -112,7 +112,7 @@ def get_data_by_id(self, key: int):
112112
return None
113113

114114
def update_hit_count_by_id(self, primary_id: int):
115-
table_name = "cache_codegpt_answer"
115+
table_name = "modelcache_llm_answer"
116116
update_sql = "UPDATE {} SET hit_count = hit_count+1 WHERE id={}".format(table_name, primary_id)
117117
conn = self.pool.connection()
118118

0 commit comments

Comments
 (0)