gateway/modules/services/serviceAi/merge_1.txt

114 lines
3.1 KiB
Text

================================================================================
JSON MERGE OPERATION #1
================================================================================
Timestamp: 2026-01-05T08:30:55.469646
INPUT:
Accumulated length: 419 chars
New Fragment length: 120 chars
Accumulated: 20 lines (showing first 5 and last 5)
{
"metadata": {
"title": "Test Document",
"author": "Test Author",
"date": "2025-01-05"
... (10 lines omitted) ...
{
"type": "heading",
"content": {
"text": "Introduction",
New Fragment: 8 lines (showing first 5 and last 5)
"level": 1
}
}
]
},
{
"id": "sec2",
"conten
Normalized Accumulated (407 chars)
(showing first 5 and last 5 of 19 lines)
{
"metadata": {
"title": "Test Document",
"author": "Test Author",
"date": "2025-01-05"
... (9 lines omitted) ...
"elements": [
{
"type": "heading",
"content": {
"text": "Introduction",
Normalized New Fragment (115 chars)
"level": 1
}
}
]
},
{
"id": "sec2",
"conten
STEP: PHASE 1
Description: Finding overlap between JSON strings
⏳ In progress...
Overlap Detection (string):
Overlap length: 0
⚠️ No overlap detected - appending all
⚠️ NO OVERLAP FOUND - This indicates iterations should stop
Closing JSON and returning final result
Closed JSON (414 chars):
==============================================================================
{
"metadata": {
"title": "Test Document",
"author": "Test Author",
"date": "2025-01-05"
},
"documents": [
{
"id": "doc1",
"title": "Document 1",
"sections": [
{
"id": "sec1",
"content_type": "heading",
"elements": [
{
"type": "heading",
"content": {
"text": "Introduction"}}]}]}]}
==============================================================================
================================================================================
MERGE RESULT: ✅ SUCCESS
================================================================================
Final result length: 414 chars
Final result (COMPLETE):
================================================================================
{
"metadata": {
"title": "Test Document",
"author": "Test Author",
"date": "2025-01-05"
},
"documents": [
{
"id": "doc1",
"title": "Document 1",
"sections": [
{
"id": "sec1",
"content_type": "heading",
"elements": [
{
"type": "heading",
"content": {
"text": "Introduction"}}]}]}]}
================================================================================