graph TD
subgraph Subagent2[Keyword & Image Analysis]
A[Start] --> B[Receive Input: extracted-listing-data]
B --> C1[Image Analysis Path]
B --> C2[Text Analysis Path]
C1 --> D1[Use GPT Vision API]
D1 --> E1[Generate Image Description]
C2 --> D2[Extract Keywords from Listing]
D2 --> E2[Check USPTO API for Trademarks]
E2 --> F2[Filter Out Trademarked Terms]
E1 --> G[Combine Results]
F2 --> G
G --> H[Format Output JSON]
H --> I[Return safe-keywords-and-image-description]
subgraph API_Calls
D1 --> API1[ChatGPT Vision API Call]
E2 --> API2[USPTO API Call]
end
subgraph Data_Validation
H --> V1[Verify JSON Structure]
V1 --> V2[Validate Content Length]
V2 --> V3[Check for Remaining Trademarks]
end
end
I --> Z[End]