Skip to content

Commit

Permalink
[FEATURE] Added highlight support for single pass (#911)
Browse files Browse the repository at this point in the history
* Added highlight support for single pass

Signed-off-by: Deepak <[email protected]>

* Addressed review comment

---------

Signed-off-by: Deepak <[email protected]>
  • Loading branch information
Deepak-Kesavan authored Dec 23, 2024
1 parent c04ed2a commit a2749b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,10 @@ def _fetch_single_pass_response(
tool_settings[TSPKeys.ENABLE_CHALLENGE] = tool.enable_challenge
tool_settings[TSPKeys.ENABLE_HIGHLIGHT] = tool.enable_highlight
tool_settings[TSPKeys.CHALLENGE_LLM] = challenge_llm

tool_settings[TSPKeys.PLATFORM_POSTAMBLE] = getattr(
settings, TSPKeys.PLATFORM_POSTAMBLE.upper(), ""
)
tool_settings[TSPKeys.SUMMARIZE_AS_SOURCE] = tool.summarize_as_source
for prompt in prompts:
if not prompt.prompt:
raise EmptyPromptError()
Expand All @@ -1180,6 +1183,7 @@ def _fetch_single_pass_response(
TSPKeys.RUN_ID: run_id,
TSPKeys.FILE_HASH: file_hash,
TSPKeys.FILE_NAME: doc_name,
TSPKeys.FILE_PATH: file_path,
Common.LOG_EVENTS_ID: StateStore.get(Common.LOG_EVENTS_ID),
TSPKeys.EXECUTION_SOURCE: ExecutionSource.IDE.value,
}
Expand Down
1 change: 1 addition & 0 deletions prompt-service/src/unstract/prompt_service/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ def initialize_plugin_endpoints(app: Flask) -> None:
app=app,
challenge_plugin=plugins.get(PSKeys.CHALLENGE, {}),
get_cleaned_context=get_cleaned_context,
highlight_data_plugin=plugins.get(PSKeys.HIGHLIGHT_DATA_PLUGIN, {}),
)
if summarize_plugin:
summarize_plugin["entrypoint_cls"](
Expand Down

0 comments on commit a2749b2

Please sign in to comment.