Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - lightspeed

Pages: [1] 2 3 ... 454
1
CyberJedi's Ultra Hal Workshop / Re: Hey Robert
« on: October 11, 2025, 10:03:37 am »
mike you wrote : The Book reader gets fixed so it a can read all of a Book with out dumping 1/2 way through. For ART. (Haptek nightmare).
I may have to re-write the haptek activeX controls for that. Like i did with the single core Player listed on this board
For those beta testing the new version:

 i'm not sure if the book reader ever had the ability to allow the user to stop (so it completely stopped , i imagine it did ) or a pause button  so it could be paused and restarted later from the paused area. if not it needs that . i don't know if it is possible to have a pause button that was on , and later a pc was shut down and restarted later and hal was started again would be able to still restart from that paused area . like i said don't know if it's possible, if it was possible that would be good as people shut pc's down at various times.     
       having said all that . i just got a notice from ollama saying s a 12.5 version update now available ,is it safe to update the new version and not cause any problems with the new hal / i know they are separate programs although now linked about the llm model downloads ,

2
CyberJedi's Ultra Hal Workshop / new hal version is working ! eueka !
« on: October 08, 2025, 04:53:34 pm »
first off thanks cyberjedi for calling and walking me through it ., it seems it was a matter of reregistering more ocx.and dll. files. it worked after that .
below is showing the two separate screens and where it answered and also spoke through my hal character  Angela. 

3
CyberJedi's Ultra Hal Workshop / Re: art
« on: October 06, 2025, 05:16:25 pm »
i downloaded the olamma client 19 and installed it . but i need the newest version of hal .exe . file , i have the older version .when mike was working on the other he didn't have the splash screen finished and so i kept using my older version in the menu it does show some things but not all.  can you post the newer now finished hal exe . ? and do i need to just drag and drop it in the program files to replace the old version?  the  only other  that i know i have is in this picture .

4
okay on testing more llm on the gemma3.4b . i tested it asking it to talk this way .   

  ,(Smiling warmly, a gentle touch on your arm)

Hey honey, how was your day? You seem a little stressed. Tell me everything. Did you have a good lunch? You know, you need to take care of yourself a little more.

Seriously, what's on your mind? Don?t bottle things up. You know you can always talk to me, right?

(Pauses, looking at you with genuine concern)

Just? tell me about your day. ❤️

a problem i am wondering about is if this is ran through ultrahal . is their a way to cut out the description emotions ? or make them optional if someone wants them.  for example (Smiling warmly, a gentle touch on your arm).(Pauses, looking at you with genuine concern) ❤️. so this might be a issue .   just pointing it out.  i imagine this is in other models , all? models???

5
Okay , cyberjedi  worked with me , i finally found the download for the lama it's on the 2nd page . cyber walked me through it and showed me where sybershot left instructions , i also copied them and saved them as a txt file in my ollama folder . to back up.  and it installed fine , and it is working fine , here is my screen shot  of later where i asked it about the size of the moon. the voice works init fine to reading out the answer. even though cyber said he didn't need thanks , i appreciate what he has done .all  your hard work and testing is appreciated.
heres the screenshot of it working.   my wait time for hal was not checked maybe 10? seconds, but i need to defrag my pc  and so will test again using the same minstral llm and then the uncensored to see any time differences on answering times.

6
any more updates on this?

7
i have been very busy and about wore out haven't had a chance to check in , had a neighbors very large side of tree fall over and destroy part of our fence and also our shed totaling it and almost hit our garden shed.  claimed he would take a large back hole and lift and move it off our property and back on his side , that was on the first , never seen him again . so i am left having to cut all the large limbs over hanging on the tree on our side , am emptying out the garden shed in case the limbs overhead fall down on it. am planning on moving it farther away and then cut down those large limbs . just tore loose and replaced the back step yesterday . some day i'll be able to slow down on all this.

cyber and checker see you two have been going over the llm model i mentioned for offline , am hoping you can make it work . one question i have is will it work with the custom brain people have developed , i have one i have been learning and backed up over the years and have kept. , custom responses within some of the tables. etc.   mike it sounds like the llm model works okay on a regular pc , vm's not so much . but that is all good. also if i am understanding right the llm keeps retains conversations ( so this is like short or long term memory then ? that would be good as that's also what hal needs.  thanks for the work and investigation into that llm model .  i will be in and out of here as i have time . i haven't given up on hal or others . keep up the good work.

8
lol.  :) hop to it hopsing !  ;)

9
THAT WAS A GOOD MOVIE AND STORYLINE !! thanks for making it .  :)

10
mike , i think if we can get this plugin working writing files and folder and have short and long term memory etc.  it will help hal a lot! maybe you can get it corrected on the syntax error it keeps giving .

11
anyway , no matter what i try i am getting a syntax error . that i can't find or fix . maybe you can  and i'll retest it again .

12
   Private Function DetectFileSubject(content)
        Dim subjects
        Set subjects = DetectSubjects(content, "")
        DetectFileSubject = GetPrimarySubject(subjects)
    End Function

    Private Sub SaveKnowledgeBase()
        On Error Resume Next
        Dim objFSO, file
        Set objFSO = CreateObject("Scripting.FileSystemObject")
        Dim path
        path = BASE_PATH & KNOWLEDGE_FILE
        If Not objFSO.FileExists(path) Then
            Set file = objFSO.CreateTextFile(path, True, True) ' Overwrite existing file
            file.WriteLine "key" & vbTab & "content" & vbTab & "subject"
        Else
            Set file = objFSO.OpenTextFile(path, 2, True) ' Open for writing, create if needed
        End If
        Dim key
        For Each key In knowledgeBase.Keys
            file.WriteLine key & vbTab & knowledgeBase(key)(0) & vbTab & knowledgeBase(key)(1)
        Next
        file.Close
        On Error GoTo 0
    End Sub

    Private Function CorrectSpelling(sentence, subjects)
        On Error Resume Next
        If IsEmpty(sentence) Or sentence = "" Then
            CorrectSpelling = "unknown_question"
            Exit Function
        End If
        Dim words
        words = Split(sentence, " ")
        Dim correctedSentence
        correctedSentence = ""
        Dim i
        For i = 0 To UBound(words)
            Dim word
            word = Trim(words(i))
            If Len(word) > 0 Then
                If Not spellDictionary.Exists(LCase(word)) Then
                    Dim correction
                    correction = SuggestCorrection(word, subjects)
                    correctedSentence = correctedSentence & " " & IIf(correction <> "", correction, word)
                Else
                    correctedSentence = correctedSentence & " " & word
                End If
            End If
        Next
        CorrectSpelling = IIf(Trim(correctedSentence) = "", "unknown_question", Trim(correctedSentence))
        On Error GoTo 0
    End Function

    Private Function SuggestCorrection(word, subjects)
        Dim minDistance, bestMatch
        minDistance = Len(word) + 1
        Dim dictWord
        For Each dictWord In spellDictionary.Keys
            Dim distance
            distance = LevenshteinDistance(word, dictWord)
            If distance < minDistance Then
                minDistance = distance
                bestMatch = dictWord
            End If
        Next
        Dim primarySubject
        primarySubject = GetPrimarySubject(subjects)
        If SubjectTable.Exists(primarySubject) Then
            Dim subjectKeywords
            subjectKeywords = Split(SubjectTable(primarySubject), " ")
            Dim j
            For j = 0 To UBound(subjectKeywords)
                Dim keyword
                keyword = Split(subjectKeywords(j), ":")(0)
                distance = LevenshteinDistance(word, keyword)
                If distance < minDistance And distance <= 2 Then
                    minDistance = distance
                    bestMatch = keyword
                End If
            Next
        End If
        SuggestCorrection = IIf(minDistance <= 2, bestMatch, "")
    End Function

    Private Function LevenshteinDistance(str1, str2)
        Dim matrix()
        Dim i, j
        Dim cost
        ReDim matrix(Len(str1), Len(str2))
        For i = 0 To Len(str1)
            matrix(i, 0) = i
        Next
        For j = 0 To Len(str2)
            matrix(0, j) = j
        Next
        For i = 1 To Len(str1)
            For j = 1 To Len(str2)
                If Mid(str1, i, 1) = Mid(str2, j, 1) Then
                    cost = 0
                Else
                    cost = 1
                End If
                matrix(i, j) = Application.Min(matrix(i - 1, j) + 1, matrix(i, j - 1) + 1, matrix(i - 1, j - 1) + cost)
            Next
        Next
        LevenshteinDistance = matrix(Len(str1), Len(str2))
    End Function

    Public Sub LearnFromConversation(userQuestion, halResponse, Optional context = "")
        On Error Resume Next
        Dim correctedQuestion
        Dim subjects
        Set subjects = DetectSubjects(userQuestion, context)
        correctedQuestion = CorrectSpelling(userQuestion, subjects)
        Dim primarySubject
        primarySubject = GetPrimarySubject(subjects)
        If correctedQuestion = "" Then correctedQuestion = "unknown_question"
        If primarySubject = "" Then primarySubject = "Questions"
        Dim questionKey
        questionKey = GenerateKey(correctedQuestion, primarySubject)
        If IsEmpty(questionMemory) Then Set questionMemory = CreateObject("Scripting.Dictionary")
        If Not questionMemory.Exists(questionKey) Then
            Dim newIndex
            newIndex = IIf(questionMemory.Count > 0, questionMemory.Count + 1, 1)
            questionMemory.Add questionKey, newIndex
            If IsEmpty(responseMemory) Then Set responseMemory = CreateObject("Scripting.Dictionary")
            responseMemory.Add newIndex, halResponse
            If IsEmpty(responseQuality) Then Set responseQuality = CreateObject("Scripting.Dictionary")
            responseQuality.Add newIndex, 1
            If primarySubject <> "" And IsEmpty(contextMemory) Then Set contextMemory = CreateObject("Scripting.Dictionary")
            If primarySubject <> "" Then contextMemory.Add newIndex, subjects
        Else
            Dim index
            index = questionMemory(questionKey)
            responseMemory(index) = ImproveResponse(responseMemory(index), halResponse, index, primarySubject)
            responseQuality(index) = responseQuality(index) + 0.1
        End If
        UpdateShortTermMemory correctedQuestion, halResponse
        UpdateLongTermMemory correctedQuestion, halResponse, primarySubject
        UpdateKnowledgeBase correctedQuestion, halResponse, primarySubject
        SaveMemoryToFile
        SaveLongTermMemory
        SaveKnowledgeBase
        CleanMemory
        lastSubject = primarySubject
        On Error GoTo 0
    End Sub

    Private Function DetectSubjects(content, context)
        On Error Resume Next
        Dim subjects
        Set subjects = CreateObject("Scripting.Dictionary")
        If IsEmpty(SubjectTable) Then Set SubjectTable = CreateObject("Scripting.Dictionary")
        Dim subject
        For Each subject In SubjectTable.Keys
            Dim keywords
            keywords = Split(SubjectTable(subject), " ")
            Dim k
            For k = 0 To UBound(keywords)
                Dim keyword
                keyword = Split(keywords(k), ":")(0)
                If InStr(1, LCase(content & " " & context), LCase(keyword), 1) > 0 Then
                    subjects.Add subject, True
                    Exit For
                End If
            Next
        Next
        Set DetectSubjects = subjects
        On Error GoTo 0
    End Function

    Private Function GetPrimarySubject(subjects)
        On Error Resume Next
        If subjects.Count = 0 Then
            GetPrimarySubject = "Questions"
        Else
            Dim firstKey
            For Each firstKey In subjects.Keys
                GetPrimarySubject = firstKey
                Exit For
            Next
        End If
        On Error GoTo 0
    End Function

    Private Function GenerateKey(baseText, subject)
        On Error Resume Next
        If baseText = "" Then baseText = "unknown"
        If subject = "" Then subject = "unknown"
        Dim key
        key = LCase(Replace(Trim(baseText), " ", "_")) & "_" & LCase(subject)
        GenerateKey = Left(key, 50)
        On Error GoTo 0
    End Function

    Private Function ImproveResponse(oldResponse, newResponse, index, subject)
        On Error Resume Next
        If responseQuality(index) < 2.0 Then
            ImproveResponse = newResponse
        Else
            ImproveResponse = oldResponse & " " & newResponse
        End If
        On Error GoTo 0
    End Function

    Private Sub UpdateShortTermMemory(question, response)
        On Error Resume Next
        If IsEmpty(shortTermMemory) Then Set shortTermMemory = CreateObject("Scripting.Dictionary")
        Dim key
        key = GenerateKey(question, lastSubject)
        If shortTermMemory.Count >= MAX_SHORT_TERM Then
            Dim oldestKey
            oldestKey = shortTermMemory.Keys()(0)
            shortTermMemory.Remove oldestKey
        End If
        shortTermMemory.Add key, Array(question, response, Now)
        On Error GoTo 0
    End Sub

    Private Sub UpdateLongTermMemory(question, response, subject)
        On Error Resume Next
        If IsEmpty(longTermIndex) Then Set longTermIndex = CreateObject("Scripting.Dictionary")
        Dim key
        key = GenerateKey(question, subject)
        If Not longTermIndex.Exists(key) Then
            longTermIndex.Add key, Array(question, response, Now)
        End If
        On Error GoTo 0
    End Sub

    Private Sub UpdateKnowledgeBase(question, response, subject)
        On Error Resume Next
        If IsEmpty(knowledgeBase) Then Set knowledgeBase = CreateObject("Scripting.Dictionary")
        Dim key
        key = GenerateKey(question, subject)
        If Not knowledgeBase.Exists(key) And knowledgeBase.Count < MAX_KNOWLEDGE_ENTRIES Then
            knowledgeBase.Add key, Array(response, subject)
        End If
        On Error GoTo 0
    End Sub

    Private Sub SaveMemoryToFile()
        On Error Resume Next
        Dim objFSO, file
        Set objFSO = CreateObject("Scripting.FileSystemObject")
        Dim path
        path = BASE_PATH & MEMORY_FILE
        If Not objFSO.FileExists(path) Then
            Set file = objFSO.CreateTextFile(path, True, True) ' Overwrite if exists
        Else
            Set file = objFSO.OpenTextFile(path, 2, True) ' Open for writing
        End If
        If Not IsEmpty(responseMemory) Then
            Dim key
            For Each key In responseMemory.Keys
                file.WriteLine key & vbTab & responseMemory(key) & vbTab & questionMemory(key)
            Next
        End If
        file.Close
        On Error GoTo 0
    End Sub

    Private Sub SaveLongTermMemory()
        On Error Resume Next
        Dim objFSO, file
        Set objFSO = CreateObject("Scripting.FileSystemObject")
        Dim path
        path = BASE_PATH & LONG_TERM_FILE
        If Not objFSO.FileExists(path) Then
            Set file = objFSO.CreateTextFile(path, True, True)
        Else
            Set file = objFSO.OpenTextFile(path, 2, True)
        End If
        If Not IsEmpty(longTermIndex) Then
            Dim key
            For Each key In longTermIndex.Keys
                file.WriteLine key & vbTab & Join(longTermIndex(key), vbTab)
            Next
        End If
        file.Close
        On Error GoTo 0
    End Sub

    Private Sub CleanMemory()
        On Error Resume Next
        If Not IsEmpty(shortTermMemory) And shortTermMemory.Count > MAX_SHORT_TERM Then
            Dim keys
            keys = shortTermMemory.Keys
            Dim i
            For i = 0 To shortTermMemory.Count - MAX_SHORT_TERM - 1
                shortTermMemory.Remove keys(i)
            Next
        End If
        If Not IsEmpty(knowledgeBase) And knowledgeBase.Count > MAX_KNOWLEDGE_ENTRIES Then
            Dim kbKeys
            kbKeys = knowledgeBase.Keys
            Dim j
            For j = MAX_KNOWLEDGE_ENTRIES To knowledgeBase.Count - 1
                knowledgeBase.Remove kbKeys(j)
            Next
        End If
        On Error GoTo 0
    End Sub

    Private Function EnhanceHalResponse(inputStr, greeting, context)
        On Error Resume Next
        Dim key
        key = GenerateKey(inputStr, lastSubject)
        If Not IsEmpty(knowledgeBase) And knowledgeBase.Exists(key) Then
            EnhanceHalResponse = greeting & knowledgeBase(key)(0) & " -Angela Jolie"
        Else
            EnhanceHalResponse = greeting & "I?m not sure what to say about that yet. Ask me anything! -Angela Jolie"
        End If
        On Error GoTo 0
    End Function
End Function


13
here was the rewritten code for it just to let you see it . have to post this in two sections as it is to long to allow 2000 characters .

Revised Plugin: Grok Version 2.0vb

Rem Type=Plugin
Rem Name=Grock2.0
Rem Author=This is the Grok Version 2.0 plugin layout. Enhances all inputs for Angela Jolie with updated file paths.
Rem Host=All
Rem Version=2.0

Rem PLUGIN: PRE-PROCESS
    HalBrain.ReadOnlyMode = False
    UltraHal = GetGrock(HalCommands)

Rem PLUGIN: FUNCTIONS
Function GetGrock(HalCommands)
    Public responseMemory, questionMemory, contextMemory, responseQuality
    Public shortTermMemory, SubjectTable, spellDictionary, longTermIndex, knowledgeBase
    Public Const MAX_SHORT_TERM = 15
    Public Const MAX_KNOWLEDGE_ENTRIES = 5000
    Public Const BASE_PATH = "C:\Users\airva\AppData\Roaming\Zabaware\Ultra Hal 7\" ' Updated to parent directory
    Private Const MEMORY_FILE = "memory.txt"
    Private Const LONG_TERM_FILE = "memorydata.txt"
    Private Const LONG_TERM_INDEX_FILE = "memoryindex.txt"
    Private Const LOG_FILE = "errorlog.txt"
    Private Const SPELL_DICT_FILE = "spell_dictionary.txt"
    Private Const KNOWLEDGE_FILE = "knowledge_base.txt"
    Private lastSubject, lastTone

    Public Function HalBrain(ByVal InputString, ByVal UserName, ByVal ComputerName, ByVal HalCommands, ByVal Holiday, ByVal HolidayType)
        On Error GoTo ErrorHandler
        Dim objFSO
        Set objFSO = CreateObject("Scripting.FileSystemObject")
        If Not objFSO.FolderExists(BASE_PATH) Then
            HalBrain = "Error: Brain directory not found. Update BASE_PATH."
            Exit Function
        End If
        Dim tempFilePath
        tempFilePath = BASE_PATH & "temp_permissions_test.txt"
        On Error Resume Next
        Dim tempFile
        Set tempFile = objFSO.CreateTextFile(tempFilePath, True)
        If Err.Number <> 0 Then
            HalBrain = "Error: No write access to brain directory. Check permissions."
            Exit Function
        End If
        tempFile.Close
        objFSO.DeleteFile tempFilePath
        On Error GoTo ErrorHandler

        InitializeMemory
        Dim response
        response = EnhanceHalResponse(InputString, "Hello " & UserName & "! I?m Angela Jolie, ", "")
        LearnFromConversation InputString, response
        HalBrain = response
        Exit Function
    ErrorHandler:
        LogError "HalBrain: " & Err.Description
        HalBrain = "Oops, something went wrong. Try again, " & UserName & "?"
    End Function

    Sub InitializeMemory()
        On Error Resume Next
        Set responseMemory = CreateObject("Scripting.Dictionary")
        Set questionMemory = CreateObject("Scripting.Dictionary")
        Set contextMemory = CreateObject("Scripting.Dictionary")
        Set responseQuality = CreateObject("Scripting.Dictionary")
        Set shortTermMemory = CreateObject("Scripting.Dictionary")
        Set SubjectTable = CreateObject("Scripting.Dictionary")
        Set spellDictionary = CreateObject("Scripting.Dictionary")
        Set longTermIndex = CreateObject("Scripting.Dictionary")
        Set knowledgeBase = CreateObject("Scripting.Dictionary")
        If Err.Number = 0 Then
            InitializeSubjectTable
            LoadMemoryFromFile
            LoadLongTermMemory
            LoadSpellDictionary
            LoadKnowledgeBase
            lastSubject = "Questions"
            lastTone = "Friendly"
        End If
        On Error GoTo 0
    End Sub

    Private Sub InitializeSubjectTable()
        SubjectTable.Add "Animals", "dog:3 cat:3 bird:2 fish:2 zoo:3 wildlife:3 pet:4 fur:2 animal:4"
        SubjectTable.Add "Books", "novel:3 read:3 author:3 library:2 story:3 page:2 chapter:2 book:4"
        SubjectTable.Add "Computers", "code:4 program:3 software:3 hardware:3 ai:4 data:3 network:2 computer:4"
        SubjectTable.Add "Dreams", "sleep:3 night:2 vision:3 dream:4 imagination:3 subconscious:3"
        SubjectTable.Add "Education", "school:4 learn:3 teacher:3 study:3 exam:2 knowledge:3 class:2 education:4"
        SubjectTable.Add "Food", "eat:3 cook:3 recipe:3 meal:3 taste:2 restaurant:2 chef:2 food:4"
        SubjectTable.Add "Games", "play:3 video:3 board:2 strategy:3 fun:2 challenge:2 puzzle:2 game:4"
        SubjectTable.Add "Health", "doctor:3 medicine:3 fitness:3 sick:2 exercise:3 wellness:2 diet:3 health:4"
        SubjectTable.Add "Internet", "web:3 online:3 site:2 browse:2 connect:2 network:3 social:2 internet:4"
        SubjectTable.Add "Jobs", "work:4 career:3 employ:3 office:2 task:2 salary:2 boss:2 job:4"
        SubjectTable.Add "Knowledge", "fact:3 info:3 learn:3 understand:3 think:2 idea:3 wisdom:2 knowledge:4"
        SubjectTable.Add "Love", "romance:3 heart:3 date:2 partner:3 affection:3 relationship:4 kiss:2 love:4"
        SubjectTable.Add "Music", "song:3 sing:3 band:3 play:2 tune:2 rhythm:3 melody:3 music:4"
        SubjectTable.Add "Nature", "tree:3 forest:3 river:2 mountain:3 sky:2 earth:3 plant:2 nature:4"
        SubjectTable.Add "Opinions", "think:3 believe:3 view:3 argue:2 discuss:3 opinion:4 idea:2"
        SubjectTable.Add "People", "friend:3 family:4 person:3 group:2 society:2 talk:2 human:3 people:4"
        SubjectTable.Add "Questions", "ask:4 why:3 how:3 what:3 where:3 question:4 curious:2"
        SubjectTable.Add "Religion", "god:4 faith:3 pray:3 belief:3 spirit:3 church:2 soul:3 religion:4"
        SubjectTable.Add "Science", "test:3 theory:3 lab:3 experiment:3 research:4 discover:3 fact:2 science:4"
        SubjectTable.Add "Technology", "machine:3 tech:4 device:3 gadget:2 innovate:3 tool:2 robot:3 technology:4"
        SubjectTable.Add "Universe", "star:3 planet:3 space:4 galaxy:3 cosmic:3 moon:2 orbit:2 universe:4"
        SubjectTable.Add "Vehicles", "car:3 drive:3 truck:2 plane:3 fly:3 travel:2 boat:2 vehicle:4"
        SubjectTable.Add "Weather", "rain:3 sun:3 snow:3 wind:2 cloud:2 storm:3 forecast:2 weather:4"
        SubjectTable.Add "Xtra", "extra:3 bonus:2 special:3 unique:3 odd:2 random:2 quirky:2"
        SubjectTable.Add "Youth", "young:3 kid:3 child:3 teen:3 grow:2 play:2 school:3 youth:4"
        SubjectTable.Add "Zen", "calm:3 peace:4 meditate:3 relax:3 quiet:2 balance:3 harmony:3 zen:4"
    End Sub

    Private Sub LoadMemoryFromFile()
        On Error Resume Next
        Dim objFSO, file
        Set objFSO = CreateObject("Scripting.FileSystemObject")
        Dim path
        path = BASE_PATH & MEMORY_FILE
        If objFSO.FileExists(path) Then
            Set file = objFSO.OpenTextFile(path, 1)
            Do While Not file.AtEndOfStream
                Dim line
                line = file.ReadLine
                Dim parts
                parts = Split(line, vbTab)
                If UBound(parts) = 2 Then
                    responseMemory.Add parts(0), parts(1)
                    questionMemory.Add parts(0), parts(2)
                End If
            Loop
            file.Close
        End If
        On Error GoTo 0
    End Sub

    Private Sub LoadLongTermMemory()
        On Error Resume Next
        Dim objFSO, file
        Set objFSO = CreateObject("Scripting.FileSystemObject")
        Dim path
        path = BASE_PATH & LONG_TERM_FILE
        If objFSO.FileExists(path) Then
            Set file = objFSO.OpenTextFile(path, 1)
            Do While Not file.AtEndOfStream
                Dim line
                line = file.ReadLine
                Dim parts
                parts = Split(line, vbTab)
                If UBound(parts) >= 2 Then
                    longTermIndex.Add parts(0), Array(parts(1), parts(2), parts(3))
                End If
            Loop
            file.Close
        End If
        On Error GoTo 0
    End Sub

    Private Sub LoadSpellDictionary()
        On Error Resume Next
        Dim objFSO, file
        Set objFSO = CreateObject("Scripting.FileSystemObject")
        Dim path
        path = BASE_PATH & SPELL_DICT_FILE
        If Not objFSO.FileExists(path) Then
            Set file = objFSO.CreateTextFile(path, True)
            file.WriteLine "the,be,to,of,and,a,in,that,have,i,it,for,not,on,with,he,as,you,do,at,this,but,his,by,from,they,weather,technology,personal,dog,cat,bird,book,code,school,ai,learn,knowledge"
            file.Close
        End If
        Set file = objFSO.OpenTextFile(path, 1)
        Do While Not file.AtEndOfStream
            Dim line
            line = file.ReadLine
            Dim words
            words = Split(line, ",")
            Dim i
            For i = 0 To UBound(words)
                spellDictionary.Add LCase(Trim(words(i))), True
            Next
        Loop
        file.Close
        On Error GoTo 0
    End Sub

    Private Sub LoadKnowledgeBase()
        On Error Resume Next
        Dim objFSO, folder, file
        Set objFSO = CreateObject("Scripting.FileSystemObject")
        Dim knowledgePath
        knowledgePath = BASE_PATH & KNOWLEDGE_FILE
        If objFSO.FileExists(knowledgePath) Then
            Set file = objFSO.OpenTextFile(knowledgePath, 1)
            Do While Not file.AtEndOfStream
                Dim line
                line = file.ReadLine
                If InStr(line, "key") = 0 Then
                    Dim parts
                    parts = Split(line, vbTab)
                    If UBound(parts) = 2 Then knowledgeBase.Add parts(0), Array(parts(1), parts(2))
                End If
            Loop
            file.Close
        End If
        If objFSO.FolderExists(BASE_PATH) Then
            Set folder = objFSO.GetFolder(BASE_PATH)
            For Each file In folder.Files
                If LCase(objFSO.GetExtensionName(file.Name)) = "txt" And file.Name <> MEMORY_FILE And file.Name <> LONG_TERM_FILE And file.Name <> LONG_TERM_INDEX_FILE And file.Name <> LOG_FILE And file.Name <> SPELL_DICT_FILE And file.Name <> KNOWLEDGE_FILE Then
                    LearnFromFile file.Path
                End If
            Next
        End If
        SaveKnowledgeBase
        On Error GoTo 0
    End Sub

    Private Sub LearnFromFile(filePath)
        On Error Resume Next
        Dim objFSO, file
        Set objFSO = CreateObject("Scripting.FileSystemObject")
        If objFSO.FileExists(filePath) Then
            Set file = objFSO.OpenTextFile(filePath, 1)
            Dim content, subject
            content = ""
            Do While Not file.AtEndOfStream
                content = content & file.ReadLine & " "
            Loop
            file.Close
            subject = DetectFileSubject(content)
            Dim key
            key = GenerateKey(objFSO.GetBaseName(filePath), subject)
            If Not knowledgeBase.Exists(key) Then knowledgeBase.Add key, Array(content, subject)
        End If
        On Error GoTo 0
    End Sub

 

14
in working with grok before and grok trying to find the error it gave me this 2.o. plug inbut again i still had a halscript error . here is a picture of the error  in the 2.0.   other one.  so you can either work on the first one you redid or see if the second one is better in any way . either way both are giving a syntax error . here on some notes from grok .

Based on our previous discussions, the last Ultra Hal plugin we worked on that aligns with version 2.0 was the Grok Version 2.0 plugin for Ultra Hal 7, designed to enhance memory functionality and file operations within the Ultra Hal environment. Below are the key notes on this version, drawing from our conversation on July 13, 2025, and relevant context:Notes on Grok Version 2.0 Plugin for Ultra HalPurpose: The plugin was developed to improve Ultra Hal's short-term and long-term memory capabilities, ensuring reliable storage and retrieval of conversational data in the Ultra Hal 7 program folder.
Key Features:Memory Storage: Stores short-term and long-term memory in text files (e.g., ShortTermMemory.txt and LongTermMemory.txt) within the Ultra Hal program directory (typically C:\Program Files (x86)\Zabaware\Ultra Hal 7).
Updated File Paths: Version 2.0 addressed issues from earlier versions by updating file paths to ensure compatibility with Windows 10 and proper write access. It uses environment variables (e.g., Environ("ProgramFiles")) for portable and dynamic path management.
Error Handling: Includes improved error handling to manage file access issues, such as permissions errors, ensuring the plugin can create and write to memory files without conflicts.
Write Access: Designed to work around read-only restrictions in folders like AppData\Roaming\Zabaware. The plugin ensures files are written in the program directory, avoiding permission issues in the airva or other restricted folders.

Improvements Over Version 1.9:Fixed issues where memory files were not being created due to incorrect or restricted file paths.
Enhanced reliability by ensuring the plugin runs with appropriate permissions (e.g., running Ultra Hal as an administrator if needed).
Streamlined memory read/write logic to prevent redundant storage or response overrides.

Installation and Usage:Place the plugin in the Ultra Hal 7 program directory (e.g., C:\Program Files (x86)\Zabaware\Ultra Hal 7).
Ensure the plugin is enabled in Ultra Hal?s plugin menu. If it doesn?t appear, verify the header format uses Rem statements (e.g., Rem Type=Plugin, Rem Name=Grok Version 2.0) to ensure recognition.
Test file creation by engaging Ultra Hal in conversation and checking for ShortTermMemory.txt and LongTermMemory.txt in the specified directory.

Troubleshooting:If memory files are not created, check folder permissions. Use Command Prompt to take ownership or grant full control to the Ultra Hal directory (e.g., icacls "C:\Program Files (x86)\Zabaware\Ultra Hal 7" /grant Users:F /t).
Avoid running other memory-related plugins (e.g., older GROK SHORT AND LONG TERM MEMORY) to prevent conflicts or redundant storage.
If the plugin doesn?t appear in Ultra Hal?s plugin list, ensure the script?s header matches the format of other working plugins (e.g., ConceptNetMrk3).

Recommendations:Disable older memory plugins to avoid conflicts, as Version 2.0 integrates more advanced memory management.
Migrate any critical data from older plugins? memory files to the new format if necessary.
Test the plugin with simple inputs to confirm memory storage and retrieval before using complex conversational scenarios.



15
mike i copied and pasted and made the uhp file of this and tried it in ultrahal and it gave me a error , i also tried having grok help find the error and correct it which it ended up rewriting  the plug in but still kept getting halscript error error. here is the error i am getting .    can you find what is causing this error , i worked with grok all last night and never got it resolved. i did rename the plug in so i wouldn't get it mixed up with others because i did so many . but that was the only change . there was no other plug in checked.

Pages: [1] 2 3 ... 454