File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ def save_ac_value(record_id: str, attr_value: Any) -> None:
122
122
123
123
calculated_attribute_by_record_id [record_id ] = attr_value
124
124
125
- if data_type == "LLM_RESPONSE" :
125
+ if data_type == "LLM_RESPONSE" and "http" in CACHE_FILE_UPLOAD_LINK_A2VYBG :
126
126
llm_ac_cache [llm_config_hash ] = cached_records
127
127
requests .put (CACHE_FILE_UPLOAD_LINK_A2VYBG , json = llm_ac_cache )
128
128
@@ -218,7 +218,10 @@ def make_batches(
218
218
219
219
if data_type == "LLM_RESPONSE" :
220
220
llm_config = attribute_calculators .get_llm_config ()
221
- llm_ac_cache = requests .get (CACHE_ACCESS_LINK_A2VYBG ).json ()
221
+ if "http" in CACHE_ACCESS_LINK_A2VYBG :
222
+ llm_ac_cache = requests .get (CACHE_ACCESS_LINK_A2VYBG ).json ()
223
+ else :
224
+ llm_ac_cache = {}
222
225
llm_config_hash = md5 (json .dumps (llm_config ).encode ()).hexdigest ()
223
226
224
227
cached_records = llm_ac_cache .get (llm_config_hash , {})
You can’t perform that action at this time.
0 commit comments