I have a tool that exports all Lotus Script code from Notes databases. I get this code into Make and the next step is to create vectors for Pinecone. But the code export is to large for openai to generate vectors. For now its good to split the code into parts or bundles of lets say 3000 characters. Then each bundle will continue its flow to OpenAI getvectors and then its send to Pinecone. Important for me is that when I add the vectors to pinecone I can indicate part 1, 2 and 3.
The text I work with, I made it shorter
[
{
“scope”: “roundtrip”,
“variables”: [
{
“name”: “scriptsdata2”,
“value”: “FORMS-Form: Update-‘++LotusScript Development Environment:2:5:(Options):0:74-Option Explicit–’++LotusScript Development Environment:2:5:(Forward):0:1-Declare Sub Querysave(Source As Notesuidocument, Continue As Variant)-Declare Sub Querymodechange(Source As Notesuidocument, Continue As Variant)-Declare Sub Postopen(Source As Notesuidocument)–‘++LotusScript Development Environment:2:5:(Declarations):0:10-Dim bPostOpenEvent As Boolean–’++LotusScript Development Environment:2:2:BindEvents:1:129-Private Sub BindEvents(Byval Objectname_ As String)-Static Source As NOTESUIDOCUMENT-Set Source = Bind(Objectname_)-On Event Querysave From Source Call Querysave-On Event Querymodechange From Source Call Querymodechange-On Event Postopen From Source Call Postopen-End Sub–‘++LotusScript Development Environment:2:2:Querysave:1:12-Sub Querysave(Source As Notesuidocument, Continue As Variant)–If source.document.IsNew(0) =-Ja- Then-Call source.FieldSetText(-IsNew-, -Nee-)-End If–End Sub-’++LotusScript Development Environment:2:2:Querymodechange:1:12-Sub Querymodechange(Source As Notesuidocument, Continue As Variant)-If bPostOpenEvent Then Exit Sub-If source.EditMode = False Then-Continue = False-End If-End Sub-‘++LotusScript Development Environment:2:2:Postopen:1:12-Sub Postopen(Source As Notesuidocument)-If source.EditMode Then-bPostOpenEvent = True-source.EditMode = False-bPostOpenEvent = False-End If-End Sub----Form: (dlgEmailEscalatie)-’++LotusScript Development Environment:2:5:(Options):0:66–‘++LotusScript Development Environment:2:5:(Forward):0:1-Declare Sub Queryclose(Source As Notesuidocument, Continue As Variant)-Declare Sub Postopen(Source As Notesuidocument)–’++LotusScript Development Environment:2:5:(Declarations):0:2–‘++LotusScript Development Environment:2:2:BindEvents:1:129-Private Sub BindEvents(Byval Objectname_ As String)-Static Source As NOTESUIDOCUMENT-Set Source = Bind(Objectname_)-On Event Queryclose From Source Call Queryclose-On Event Postopen From Source Call Postopen-End Sub–’++LotusScript Development Environment:2:2:Queryclose:1:12-Sub Queryclose(Source As Notesuidocument, Continue As Variant)-If source.DialogBoxCanceled Then Exit Sub-If source.Document.sendto(0) = – Then-Msgbox -Geef een email adres op-,48, -Versturen–continue = False-Exit Sub-End If-If source.Document.subject(0) = – Then-Msgbox -Geef een onderwerp op -,48, -Versturen–continue = False-Exit Sub-End If-source.Save-End Sub-‘++LotusScript Development Environment:2:2:Postopen:1:12-Sub Postopen(Source As Notesuidocument)–End Sub----Form: Vraag-’++LotusScript Development Environment:2:5:(Options):0:74-Option Explicit–‘++LotusScript Development Environment:2:5:(Forward):0:1-Declare Sub Querysave(Source As Notesuidocument, Continue As Variant)-Declare Sub Querymodechange(Source As Notesuidocument, Continue As Variant)-Declare Sub Postopen(Source As Notesuidocument)–’++LotusScript Development Environment:2:5:(Declarations):0:10-Dim bPostOpenEvent As Boolean–‘++LotusScript Development Environment:2:2:BindEvents:1:129-Private Sub BindEvents(Byval Objectname_ As String)-Static Source As NOTESUIDOCUMENT-Set Source = Bind(Objectname_)-On Event Querysave From Source Call Querysave-On Event Querymodechange From Source Call Querymodechange-On Event Postopen From Source Call Postopen-End Sub–’++LotusScript Development Environment:2:2:Querysave:1:12-Sub Querysave(Source As Notesuidocument, Continue As Variant)–End Sub-‘++LotusScript Development Environment:2:2:Querymodechange:1:12-Sub Querymodechange(Source As Notesuidocument, Continue As Variant)-If bPostOpenEvent Then Exit Sub-If source.EditMode = False Then-Continue = False-End If-End Sub-’++LotusScript Development Environment:2:2:Postopen:1:12-Sub Postopen(Source As Notesuidocument)-If source.EditMode Then-bPostOpenEvent = True-source.EditMode = False-bPostOpenEvent = False-End If-End Sub----Form: zzz(tabSoortUpdate)-‘++LotusScript Development Environment:2:5:(Options):0:66–’++LotusScript Development Environment:2:5:(Forward):0:1-Declare Sub Then-continue=False-Exit Sub-Else-Call source.save ‘reopen to reload subforms-Call ws.editdocument(True, source.Document)-End If–End If-uidoc.RefreshHideFormulas–End Sub-’++LotusScript Development Environment:2:2:Queryclose:1:12-Sub Queryclose(Source As Notesuidocument, Continue As Variant)–End Sub-‘++LotusScript Development Environment:2:2:Postmodechange:1:12-Sub Postmodechange(Source As Notesuidocument)-‘Dim itm As NotesItem–If source.EditMode And source.FieldGetText(-K_Status-) = -Ter acceptatie- Then-If sNwBeh <>-- Then-source.document.K_Afhandelaar= sNwBeh-End If-source.document.K_Status= -In behandeling–Call Source.FieldSetText(-K_Status-,-In behandeling-)-If source.document.K_AcceptatieDatum(0) = – Then-source.document.K_AcceptatieDatum=Today-End If-’ Set itm = source.document.GetFirstItem(-K_DoorstuurLog-)-’ itm.AppendToTextList Format (Now,-dd-mm-yyyy hh:mm:ss-) & - Klacht geaccepteerd door - & source.document.K_Afhandelaar(0)-Call klacht3.logStep(source.document, True, Format (Now,-dd-mm-yyyy hh:mm:ss-) & - Klacht geaccepteerd door - & source.document.K_Afhandelaar(0), source.document.K_RubriceringTeam(0), source.document.K_Afhandelaar(0))-source.save-source.RefreshHideFormulas-End If–End Sub-'++LotusScript Development Environment:2:2:Querysave:1:12-Sub Querysave(Source As Notesuidocument, Continue As Variant)–If source.FieldgetText(-VraagAnt-) >< – Then-Msgbox -Er staat nog een tekst in het veld vraag/antwoord. Graag deze tekst doorzetten of verwijderen.-, 48, -Wacht–Call source.gotofield(-VraagAnt-)-Continue = False-Exit Sub-End If–If source.FieldgetText(-tmpKlantContact-) >< – Then-Msgbox -Er staat nog een tekst in het veld notitie/klantcontact. Graag de tekst opslaan of verwijderen.-, 48, -Wacht–Call source.gotofield(-tmpKlantContact-)-Continue = False-Exit Sub-End If-End Sub”
}
]
}
]
Here I must do the bundle splitting operation