Skip to content

Commit a2749b2

Browse files
[FEATURE] Added highlight support for single pass (#911)
* Added highlight support for single pass Signed-off-by: Deepak <89829542+Deepak-Kesavan@users.noreply.github.com> * Addressed review comment --------- Signed-off-by: Deepak <89829542+Deepak-Kesavan@users.noreply.github.com>
1 parent c04ed2a commit a2749b2

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

backend/prompt_studio/prompt_studio_core_v2/prompt_studio_helper.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1157,7 +1157,10 @@ def _fetch_single_pass_response(
11571157
tool_settings[TSPKeys.ENABLE_CHALLENGE] = tool.enable_challenge
11581158
tool_settings[TSPKeys.ENABLE_HIGHLIGHT] = tool.enable_highlight
11591159
tool_settings[TSPKeys.CHALLENGE_LLM] = challenge_llm
1160-
1160+
tool_settings[TSPKeys.PLATFORM_POSTAMBLE] = getattr(
1161+
settings, TSPKeys.PLATFORM_POSTAMBLE.upper(), ""
1162+
)
1163+
tool_settings[TSPKeys.SUMMARIZE_AS_SOURCE] = tool.summarize_as_source
11611164
for prompt in prompts:
11621165
if not prompt.prompt:
11631166
raise EmptyPromptError()
@@ -1180,6 +1183,7 @@ def _fetch_single_pass_response(
11801183
TSPKeys.RUN_ID: run_id,
11811184
TSPKeys.FILE_HASH: file_hash,
11821185
TSPKeys.FILE_NAME: doc_name,
1186+
TSPKeys.FILE_PATH: file_path,
11831187
Common.LOG_EVENTS_ID: StateStore.get(Common.LOG_EVENTS_ID),
11841188
TSPKeys.EXECUTION_SOURCE: ExecutionSource.IDE.value,
11851189
}

prompt-service/src/unstract/prompt_service/helper.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ def initialize_plugin_endpoints(app: Flask) -> None:
113113
app=app,
114114
challenge_plugin=plugins.get(PSKeys.CHALLENGE, {}),
115115
get_cleaned_context=get_cleaned_context,
116+
highlight_data_plugin=plugins.get(PSKeys.HIGHLIGHT_DATA_PLUGIN, {}),
116117
)
117118
if summarize_plugin:
118119
summarize_plugin["entrypoint_cls"](

0 commit comments

Comments
 (0)