Skip to content

Commit

Permalink
Use product description HTML for OpenAI categorization
Browse files Browse the repository at this point in the history
  • Loading branch information
jamalsoueidan committed Jul 14, 2024
1 parent aaf968b commit 37024bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export const updateProduct = async ({
if (!product.hideFromProfile) {
const categories = await OpenAIServiceProductCategorize({
title: product.title,
description: product.description || "",
description: product.descriptionHtml || "",
});

categories?.forEach((category) => {
Expand Down
5 changes: 4 additions & 1 deletion src/functions/webook-product.function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ app.http("webhookProductUpdate", {
customerId: parseInt(customerId),
productId: shopifyProduct.id,
},
{ title: shopifyProduct.title, description: shopifyProduct.body_html }
{
title: shopifyProduct.title,
descriptionHtml: shopifyProduct.body_html,
}
);

await WebhookUpdateProductOrchestration(
Expand Down

0 comments on commit 37024bb

Please sign in to comment.