Skip to content

Commit

Permalink
修改: bot/adapters/storage/separatedmemorystorage.go
Browse files Browse the repository at this point in the history
  • Loading branch information
TsaoLun committed Aug 15, 2023
1 parent 1a87f4c commit 2904990
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bot/adapters/storage/separatedmemorystorage.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package storage

import (
"encoding/gob"
"log"
"os"

"github.com/tsaolun/chatbot/bot/nlp"
Expand All @@ -17,6 +18,7 @@ func NewSeparatedMemoryStorage(filepath string) (*separatedMemoryStorage, error)
var declarativeStorage, questionStorage GobStorage

if _, err := os.Stat(filepath); err == nil {
log.Printf("Loading separated memory storage from %s", filepath)
f, err := os.Open(filepath)
if err != nil {
return nil, err
Expand Down

0 comments on commit 2904990

Please sign in to comment.