File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 4040 'metrix_bridges_' : 'metrix_bridges_' ,
4141 'rate_limit_' : 'rate_limit_' ,
4242 'files_' : 'files_' ,
43- 'openai_batch_ ' : 'openai_batch_ ' ,
43+ 'batch_ ' : 'batch_ ' ,
4444 'avg_response_time_' : 'avg_response_time_' ,
4545 'gpt_memory_' : 'gpt_memory_' ,
4646 'timezone_and_org_' : 'timezone_and_org_' ,
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ async def batch_execute(self):
9393 "batch_variables" : batch_variables ,
9494 "custom_id_mapping" : {item ["custom_id" ]: idx for idx , item in enumerate (message_mappings )}
9595 }
96- cache_key = f"{ redis_keys ['openai_batch_ ' ]} { batch_file .id } "
96+ cache_key = f"{ redis_keys ['batch_ ' ]} { batch_file .id } "
9797 await store_in_cache (cache_key , batch_json , ttl = 86400 )
9898 return {
9999 "success" : True ,
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ async def repeat_function():
2020async def check_batch_status ():
2121 try :
2222 print ("Batch Script running..." )
23- batch_ids = await find_in_cache_with_prefix ('openai_batch_ ' )
23+ batch_ids = await find_in_cache_with_prefix ('batch_ ' )
2424 if batch_ids is None :
2525 return
2626 for id in batch_ids :
@@ -96,7 +96,7 @@ async def check_batch_status():
9696 has_success = any (item .get ("status_code" ) is None or item .get ("status_code" , 200 ) < 400 for item in file_content )
9797
9898 await sendResponse (response_format , data = file_content , success = has_success )
99- cache_key = f"{ redis_keys ['openai_batch_ ' ]} { batch_id } "
99+ cache_key = f"{ redis_keys ['batch_ ' ]} { batch_id } "
100100 await delete_in_cache (cache_key )
101101 finally :
102102 # Ensure http_client is properly closed
You can’t perform that action at this time.
0 commit comments