Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Zipstack/unstract into fix/prompt-s…
Browse files Browse the repository at this point in the history
…tudio-coverage
  • Loading branch information
jagadeeswaran-zipstack committed Dec 22, 2024
2 parents 825f51e + ee41dff commit d309deb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion prompt-service/src/unstract/prompt_service/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from unstract.sdk.exceptions import SdkError
from unstract.sdk.llm import LLM

from unstract.flags.src.unstract.flags.feature_flag import check_feature_flag_status
from unstract.flags.feature_flag import check_feature_flag_status

if check_feature_flag_status(FeatureFlag.REMOTE_FILE_STORAGE):
from unstract.sdk.file_storage import FileStorage, FileStorageProvider
Expand Down
5 changes: 3 additions & 2 deletions tools/structure/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def run(
structured_output_dict[SettingsKeys.METADATA] = metadata
structured_output = json.dumps(structured_output_dict)

metrics = structured_output_dict[SettingsKeys.METRICS]
metrics = structured_output_dict.get(SettingsKeys.METRICS, {})
new_metrics = {}
if tool_settings[SettingsKeys.ENABLE_SINGLE_PASS_EXTRACTION]:
new_metrics = {
Expand All @@ -267,7 +267,8 @@ def run(
for key in set(metrics)
| set(index_metrics) # Union of keys from both dictionaries
}
structured_output_dict[SettingsKeys.METRICS] = new_metrics
if new_metrics:
structured_output_dict[SettingsKeys.METRICS] = new_metrics
# Update GUI
output_log = (
f"## Result\n**NOTE:** In case of a deployed pipeline, the result would "
Expand Down

0 comments on commit d309deb

Please sign in to comment.