packages/blueprints/gen-ai-chatbot/static-assets/chatbot-genai-components/backend/python/app/repositories/custom_bot.py [338:395]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        embedding_params=EmbeddingParamsModel(
            # For backward compatibility
            chunk_size=(
                item["EmbeddingParams"]["chunk_size"]
                if "EmbeddingParams" in item and "chunk_size" in item["EmbeddingParams"]
                else 1000
            ),
            chunk_overlap=(
                item["EmbeddingParams"]["chunk_overlap"]
                if "EmbeddingParams" in item
                and "chunk_overlap" in item["EmbeddingParams"]
                else 200
            ),
            enable_partition_pdf=(
                item["EmbeddingParams"]["enable_partition_pdf"]
                if "EmbeddingParams" in item
                and "enable_partition_pdf" in item["EmbeddingParams"]
                else False
            ),
        ),
        generation_params=GenerationParamsModel(
            **(
                item["GenerationParams"]
                if "GenerationParams" in item
                else DEFAULT_GENERATION_CONFIG
            )
        ),
        search_params=SearchParamsModel(
            max_results=(
                item["SearchParams"]["max_results"]
                if "SearchParams" in item
                else DEFAULT_SEARCH_CONFIG["max_results"]
            )
        ),
        agent=(
            AgentModel(**item["AgentData"])
            if "AgentData" in item
            else AgentModel(tools=[])
        ),
        knowledge=KnowledgeModel(**item["Knowledge"]),
        sync_status=item["SyncStatus"],
        sync_status_reason=item["SyncStatusReason"],
        sync_last_exec_id=item["LastExecId"],
        published_api_stack_name=(
            None
            if "ApiPublishmentStackName" not in item
            else item["ApiPublishmentStackName"]
        ),
        published_api_datetime=(
            None if "ApiPublishedDatetime" not in item else item["ApiPublishedDatetime"]
        ),
        published_api_codebuild_id=(
            None
            if "ApiPublishCodeBuildId" not in item
            else item["ApiPublishCodeBuildId"]
        ),
        display_retrieved_chunks=item.get("DisplayRetrievedChunks", False),
    )
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



packages/blueprints/gen-ai-chatbot/static-assets/chatbot-genai-components/backend/python/app/repositories/custom_bot.py [423:480]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        embedding_params=EmbeddingParamsModel(
            # For backward compatibility
            chunk_size=(
                item["EmbeddingParams"]["chunk_size"]
                if "EmbeddingParams" in item and "chunk_size" in item["EmbeddingParams"]
                else 1000
            ),
            chunk_overlap=(
                item["EmbeddingParams"]["chunk_overlap"]
                if "EmbeddingParams" in item
                and "chunk_overlap" in item["EmbeddingParams"]
                else 200
            ),
            enable_partition_pdf=(
                item["EmbeddingParams"]["enable_partition_pdf"]
                if "EmbeddingParams" in item
                and "enable_partition_pdf" in item["EmbeddingParams"]
                else False
            ),
        ),
        generation_params=GenerationParamsModel(
            **(
                item["GenerationParams"]
                if "GenerationParams" in item
                else DEFAULT_GENERATION_CONFIG
            )
        ),
        search_params=SearchParamsModel(
            max_results=(
                item["SearchParams"]["max_results"]
                if "SearchParams" in item
                else DEFAULT_SEARCH_CONFIG["max_results"]
            )
        ),
        agent=(
            AgentModel(**item["AgentData"])
            if "AgentData" in item
            else AgentModel(tools=[])
        ),
        knowledge=KnowledgeModel(**item["Knowledge"]),
        sync_status=item["SyncStatus"],
        sync_status_reason=item["SyncStatusReason"],
        sync_last_exec_id=item["LastExecId"],
        published_api_stack_name=(
            None
            if "ApiPublishmentStackName" not in item
            else item["ApiPublishmentStackName"]
        ),
        published_api_datetime=(
            None if "ApiPublishedDatetime" not in item else item["ApiPublishedDatetime"]
        ),
        published_api_codebuild_id=(
            None
            if "ApiPublishCodeBuildId" not in item
            else item["ApiPublishCodeBuildId"]
        ),
        display_retrieved_chunks=item.get("DisplayRetrievedChunks", False),
    )
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



