From 92d1153b5a152a0ad4becae0c088976d5fb2b94f Mon Sep 17 00:00:00 2001 From: Himanshu Parihar <94682026+Pariharx7@users.noreply.github.com> Date: Sat, 4 Oct 2025 13:21:42 +0000 Subject: [PATCH] Field Description #1088 --- .gitignore | 1 + examples/product_recommendation/main.py | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 138f19ae..7b2ee3b2 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ __pycache__/ # Distribution / packaging .venv*/ dist/ +venv/ .DS_Store diff --git a/examples/product_recommendation/main.py b/examples/product_recommendation/main.py index 4c2b9123..3ee8a75e 100644 --- a/examples/product_recommendation/main.py +++ b/examples/product_recommendation/main.py @@ -94,8 +94,12 @@ class ProductTaxonomyInfo: - complementary_taxonomies: Think about when customers buy this product, what else they might need as complementary products. Put labels for these complentary products. """ - taxonomies: list[ProductTaxonomy] - complementary_taxonomies: list[ProductTaxonomy] + taxonomies: list[ProductTaxonomy] = dataclasses.field( + metadata={"description": "Taxonomies for the current product."} + ) + complementary_taxonomies: list[ProductTaxonomy] = dataclasses.field( + metadata={"description": "Think about when customers buy this product, what else they might need as complementary products. Put labels for these complentary products."} + ) @cocoindex.op.function(behavior_version=2)