Skip to content

Commit

Permalink
Update: minor timing fix for input when information is queried plus s…
Browse files Browse the repository at this point in the history
…toring memory also after Narsese inputs are made
  • Loading branch information
patham9 committed Apr 27, 2023
1 parent 9702c37 commit 3693c47
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def ProcessInput(currentTime, memory, inputforNAR, backups = ["input", "answers"
if c2 > c:
memory[(term, time)] = (currentTime, usefulness + usefulnessAddition, (f2, c2))
else:
memory[(term, currentTime)] = (currentTime, usefulnessAddition, (f2, c2))
memory[(term, time)] = (currentTime, usefulnessAddition, (f2, c2))
if ">." in inputforNAR or "! :|:" in inputforNAR:
currentTime += 1
if inputforNAR.isdigit():
Expand Down
1 change: 1 addition & 0 deletions NarsGPT.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def PromptProcess(inp, buf, send_prompt, isQuestion):
else:
occurrenceTimeInfo = "" if answer["occurrenceTime"] == "eternal" else " t="+answer["occurrenceTime"]
print("Answer: " + answer["term"] + answer["punctuation"] + " {" + str(answer["truth"]["frequency"]) + " " + str(answer["truth"]["confidence"]) + "}" + occurrenceTimeInfo)
Memory_store(filename, memory, currentTime)
continue
if inp.startswith("*memory"):
for x in memory.items():
Expand Down

0 comments on commit 3693c47

Please sign in to comment.