|
1 | 1 | #!/usr/bin/env python3 |
2 | | -import time |
3 | | - |
4 | | -import vertexai |
5 | 2 | import argparse |
6 | 3 | import asyncio |
| 4 | +import logging.config |
| 5 | +import time |
7 | 6 | from datetime import datetime |
8 | 7 |
|
9 | | -from app.vector_search.embeddings_model import EmbeddingService |
10 | | -from app.vector_search.vector_search_dependencies import get_embeddings_service |
11 | | -from pydantic import BaseModel |
12 | | - |
13 | | -from tqdm import tqdm |
14 | | -import logging.config |
15 | | -from dotenv import load_dotenv |
| 8 | +import vertexai |
16 | 9 | from bson.objectid import ObjectId |
| 10 | +from dotenv import load_dotenv |
17 | 11 | from motor.motor_asyncio import AsyncIOMotorClient |
| 12 | +from pydantic import BaseModel |
| 13 | +from tqdm import tqdm |
18 | 14 |
|
19 | 15 | from _base_data_settings import EmbeddingsScriptSettings, CompassEmbeddingsCollections, PlatformCollections |
| 16 | +from app.vector_search.embeddings_model import EmbeddingService |
| 17 | +from app.vector_search.vector_search_dependencies import get_embeddings_service |
20 | 18 | from common_libs.logging.log_utilities import setup_logging_config |
21 | 19 | from common_libs.time_utilities import get_now, datetime_to_mongo_date |
22 | 20 | from scripts.embeddings._common import EmbeddingContext, generate_indexes, redact_credentials_from_uri |
@@ -128,6 +126,8 @@ async def generate_and_save_embeddings(*, |
128 | 126 | "altLabels": document["altLabels"], |
129 | 127 | "description": document["description"], |
130 | 128 | "updatedAt": datetime.now(), |
| 129 | + "UUIDHistory": document["UUIDHistory"], |
| 130 | + "originUUID": document["UUIDHistory"][-1], |
131 | 131 | ctx.id_field_name: document["_id"] |
132 | 132 | } |
133 | 133 |
|
|
0 commit comments