Skip to content

Commit cf7899a

Browse files
committed
test: adjustments to aws s3 loader
1 parent 7961400 commit cf7899a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

api/terraform/python/openai_api/lambda_openai_function/custom_config.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,10 @@ def __init__(self, config_path: str = None, config_json: dict = None, index: int
190190

191191
if config_json:
192192
self.config_json = config_json
193+
meta_data = self.config_json.get("meta_data", {})
194+
config_path = next((item for item in meta_data if "config_path" in item))
195+
config_path = config_path["config_path"] if config_path else None
196+
self.config_path = config_path
193197

194198
self.validate()
195199
self.search_terms = SearchTerms(search_terms=self.config_json["search_terms"])
@@ -293,6 +297,7 @@ def __init__(self, config_path: str = None, aws_s3_bucket_name: str = None):
293297
if config_json:
294298
custom_config = CustomConfig(config_json=config_json, index=i)
295299
self._custom_configs.append(custom_config)
300+
print("Loaded custom config from AWS S3 bucket: ", custom_config.name, obj.key)
296301

297302
@property
298303
def valid_configs(self) -> list[CustomConfig]:

0 commit comments

Comments
 (0)