Skip to content

Commit

Permalink
Changed prompt to be more general for explore feature.
Browse files Browse the repository at this point in the history
  • Loading branch information
chigkim committed Jan 21, 2024
1 parent ee58940 commit 2e27dbd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions VOCR.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 31;
CURRENT_PROJECT_VERSION = 32;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 9N598S2535;
ENABLE_HARDENED_RUNTIME = YES;
Expand All @@ -431,7 +431,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = "2.0.0-alpha.23";
MARKETING_VERSION = "2.0.0-beta.1";
PRODUCT_BUNDLE_IDENTIFIER = com.chikim.VOCR;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand All @@ -446,7 +446,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 31;
CURRENT_PROJECT_VERSION = 32;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 9N598S2535;
ENABLE_HARDENED_RUNTIME = YES;
Expand All @@ -458,7 +458,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = "2.0.0-alpha.23";
MARKETING_VERSION = "2.0.0-beta.1";
PRODUCT_BUNDLE_IDENTIFIER = com.chikim.VOCR;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand Down
2 changes: 1 addition & 1 deletion VOCR/Navigation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ cgImage = image
guard let image = cgImage else { return }

let system = "You are a helpful assistant. Your response should be in JSON format."
let prompt = "Process the provided user interface image by segmenting it into distinct areas with related items. Output a JSON format description for each segmented area. The JSON should include: 'label' (a concise string name), 'uid' (a unique integer identifier), 'description' (a brief explanation of the area), 'content' (a string with examples of elements within the area), and 'boundingBox' (coordinates as an array: bottom_left_x, bottom_left_y, width, height). Ensure the boundingBox coordinates are normalized between 0.0 and 1.0 relative to the image's resolution (\(image.width) width and \(image.height) height), with the origin at the bottom left (0.0, 0.0). The response should start with ```json and end with ```, containing only the JSON string without inline comments or extra notes. Precision in the 'boundingBox' coordinates is crucial; even one minor inaccuracy can have severe and irreversible consequences for users."
let prompt = "Process the provided image by segmenting it into distinct areas with related items. Output a JSON format description for each segmented area. The JSON should include: 'label' (a concise string name), 'uid' (a unique integer identifier), 'description' (a brief explanation of the area), 'content' (a string with examples of objects within the area), and 'boundingBox' (coordinates as an array: bottom_left_x, bottom_left_y, width, height). Ensure the boundingBox coordinates are normalized between 0.0 and 1.0 relative to the image's resolution (\(image.width) width and \(image.height) height), with the origin at the bottom left (0.0, 0.0). The response should start with ```json and end with ```, containing only the JSON string without inline comments or extra notes. Precision in the 'boundingBox' coordinates is crucial; even one minor inaccuracy can have severe and irreversible consequences for users."
getEngine(for: Settings.engine).describe(image:image, system:system, prompt:prompt, completion: exploreHandler)
}

Expand Down

0 comments on commit 2e27dbd

Please sign in to comment.