Skip to content

Commit

Permalink
Merge branch 'main' into fix/connector_submit_handling
Browse files Browse the repository at this point in the history
  • Loading branch information
hari-kuriakose authored Jul 18, 2024
2 parents 0d40e67 + 9e27a4e commit df4afc4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 20 deletions.
3 changes: 0 additions & 3 deletions backend/prompt_studio/prompt_studio_registry/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,6 @@ class JsonSchemaKey:
ENABLE_CHALLENGE = "enable_challenge"
CHALLENGE_LLM = "challenge_llm"
ENABLE_SINGLE_PASS_EXTRACTION = "enable_single_pass_extraction"
IMAGE_URL = "image_url"
IMAGE_NAME = "image_name"
IMAGE_TAG = "image_tag"
SUMMARIZE_PROMPT = "summarize_prompt"
SUMMARIZE_AS_SOURCE = "summarize_as_source"
ENABLE_HIGHLIGHT = "enable_highlight"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,25 +119,14 @@ def get_tool_by_prompt_registry_id(
f"ID {prompt_registry_id}: {e} "
)
return None
# The below properties are introduced after 0.20.0
# So defaulting to 0.20.0 if the properties are not found
image_url = prompt_registry_tool.tool_metadata.get(
JsonSchemaKey.IMAGE_URL, "docker:unstract/tool-structure:0.0.20"
)
image_name = prompt_registry_tool.tool_metadata.get(
JsonSchemaKey.IMAGE_NAME, "unstract/tool-structure"
)
image_tag = prompt_registry_tool.tool_metadata.get(
JsonSchemaKey.IMAGE_TAG, "0.0.20"
)
return Tool(
tool_uid=prompt_registry_tool.prompt_registry_id,
properties=Properties.from_dict(prompt_registry_tool.tool_property),
spec=Spec.from_dict(prompt_registry_tool.tool_spec),
icon=prompt_registry_tool.icon,
image_url=image_url,
image_name=image_name,
image_tag=image_tag,
image_url=settings.STRUCTURE_TOOL_IMAGE_URL,
image_name=settings.STRUCTURE_TOOL_IMAGE_NAME,
image_tag=settings.STRUCTURE_TOOL_IMAGE_TAG,
)

@staticmethod
Expand Down Expand Up @@ -241,9 +230,6 @@ def frame_export_json(
export_metadata[JsonSchemaKey.DESCRIPTION] = tool.description
export_metadata[JsonSchemaKey.AUTHOR] = tool.author
export_metadata[JsonSchemaKey.TOOL_ID] = str(tool.tool_id)
export_metadata[JsonSchemaKey.IMAGE_URL] = settings.STRUCTURE_TOOL_IMAGE_URL
export_metadata[JsonSchemaKey.IMAGE_NAME] = settings.STRUCTURE_TOOL_IMAGE_NAME
export_metadata[JsonSchemaKey.IMAGE_TAG] = settings.STRUCTURE_TOOL_IMAGE_TAG

default_llm_profile = ProfileManager.get_default_llm_profile(tool)
challenge_llm_instance: Optional[AdapterInstance] = tool.challenge_llm
Expand Down

0 comments on commit df4afc4

Please sign in to comment.