aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionFreeForm/ImageLabelBox.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-06-19 15:30:54 -0400
committerbobzel <zzzman@gmail.com>2025-06-19 15:30:54 -0400
commitabdfe5b109f42cd5da4aceef1bd667c8e1f6cbbd (patch)
tree26c0d1b4d4034a98003f97ecdc771066a0e04804 /src/client/views/collections/collectionFreeForm/ImageLabelBox.tsx
parent562d6591a5e4feb7d44135445fd16056e0f8943f (diff)
parentc0daf8b6aff92b71662d9791aeaa4bb63076dd02 (diff)
Merge branch 'lanyi-branch'
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/ImageLabelBox.tsx')
-rw-r--r--src/client/views/collections/collectionFreeForm/ImageLabelBox.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/collections/collectionFreeForm/ImageLabelBox.tsx b/src/client/views/collections/collectionFreeForm/ImageLabelBox.tsx
index ff9fb14e7..e3a3f9b05 100644
--- a/src/client/views/collections/collectionFreeForm/ImageLabelBox.tsx
+++ b/src/client/views/collections/collectionFreeForm/ImageLabelBox.tsx
@@ -160,15 +160,16 @@ export class ImageLabelBox extends ViewBoxBaseComponent<FieldViewProps>() {
classifyImagesInBox = async () => {
this.startLoading();
+ const selectedImages = this._selectedImages;
// Converts the images into a Base64 format, afterwhich the information is sent to GPT to label them.
- const imageInfos = this._selectedImages.map(async doc => {
+ const imageInfos = selectedImages.map(async doc => {
if (!doc.$tags_chat) {
const url = ImageCastWithSuffix(doc[Doc.LayoutDataKey(doc)], '_o') ?? '';
return imageUrlToBase64(url).then(hrefBase64 =>
!hrefBase64 ? undefined :
- gptImageLabel(hrefBase64,'Give three labels to describe this image.').then(labels =>
+ gptImageLabel(hrefBase64, 'Give three labels to describe this image.').then(labels =>
({ doc, labels }))) ; // prettier-ignore
}
});