Chore: project rename; gf-lt => grailfinder's llm tui
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -10,3 +10,4 @@ sysprompts/*
|
|||||||
history_bak/
|
history_bak/
|
||||||
.aider*
|
.aider*
|
||||||
tags
|
tags
|
||||||
|
gf-lt
|
||||||
|
|||||||
4
Makefile
4
Makefile
@@ -1,10 +1,10 @@
|
|||||||
.PHONY: setconfig run lint
|
.PHONY: setconfig run lint
|
||||||
|
|
||||||
run: setconfig
|
run: setconfig
|
||||||
go build -o elefant && ./elefant
|
go build -o gf-lt && ./gf-lt
|
||||||
|
|
||||||
server: setconfig
|
server: setconfig
|
||||||
go build -o elefant && ./elefant -port 3333
|
go build -o gf-lt && ./gf-lt -port 3333
|
||||||
|
|
||||||
setconfig:
|
setconfig:
|
||||||
find config.toml &>/dev/null || cp config.example.toml config.toml
|
find config.toml &>/dev/null || cp config.example.toml config.toml
|
||||||
|
|||||||
10
bot.go
10
bot.go
@@ -4,11 +4,11 @@ import (
|
|||||||
"bufio"
|
"bufio"
|
||||||
"bytes"
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
"elefant/config"
|
"gf-lt/config"
|
||||||
"elefant/extra"
|
"gf-lt/extra"
|
||||||
"elefant/models"
|
"gf-lt/models"
|
||||||
"elefant/rag"
|
"gf-lt/rag"
|
||||||
"elefant/storage"
|
"gf-lt/storage"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package extra
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"elefant/config"
|
"gf-lt/config"
|
||||||
"elefant/models"
|
"gf-lt/models"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|||||||
2
llm.go
2
llm.go
@@ -2,7 +2,7 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"elefant/models"
|
"gf-lt/models"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"io"
|
"io"
|
||||||
"strings"
|
"strings"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"elefant/models"
|
"gf-lt/models"
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package models
|
package models
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"elefant/config"
|
"gf-lt/config"
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package pngmeta
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"elefant/models"
|
"gf-lt/models"
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
@@ -30,7 +30,7 @@ func WriteToPng(metadata *models.CharCardSpec, sourcePath, outfile string) error
|
|||||||
}
|
}
|
||||||
base64Data := base64.StdEncoding.EncodeToString(jsonData)
|
base64Data := base64.StdEncoding.EncodeToString(jsonData)
|
||||||
embedData := PngEmbed{
|
embedData := PngEmbed{
|
||||||
Key: "elefant", // Replace with appropriate key constant
|
Key: "gf-lt", // Replace with appropriate key constant
|
||||||
Value: base64Data,
|
Value: base64Data,
|
||||||
}
|
}
|
||||||
var outputBuffer bytes.Buffer
|
var outputBuffer bytes.Buffer
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package pngmeta
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"elefant/models"
|
"gf-lt/models"
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package pngmeta
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"elefant/models"
|
"gf-lt/models"
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ package rag
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"elefant/config"
|
"gf-lt/config"
|
||||||
"elefant/models"
|
"gf-lt/models"
|
||||||
"elefant/storage"
|
"gf-lt/storage"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"elefant/config"
|
"gf-lt/config"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"elefant/models"
|
"gf-lt/models"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package storage
|
package storage
|
||||||
|
|
||||||
import "elefant/models"
|
import "gf-lt/models"
|
||||||
|
|
||||||
type Memories interface {
|
type Memories interface {
|
||||||
Memorise(m *models.Memory) (*models.Memory, error)
|
Memorise(m *models.Memory) (*models.Memory, error)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package storage
|
package storage
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"elefant/models"
|
"gf-lt/models"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
|
|
||||||
_ "github.com/glebarez/go-sqlite"
|
_ "github.com/glebarez/go-sqlite"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package storage
|
package storage
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"elefant/models"
|
"gf-lt/models"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
"os"
|
"os"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package storage
|
package storage
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"elefant/models"
|
"gf-lt/models"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"elefant/models"
|
"gf-lt/models"
|
||||||
"elefant/pngmeta"
|
"gf-lt/pngmeta"
|
||||||
"elefant/rag"
|
"gf-lt/rag"
|
||||||
|
|
||||||
"github.com/gdamore/tcell/v2"
|
"github.com/gdamore/tcell/v2"
|
||||||
"github.com/rivo/tview"
|
"github.com/rivo/tview"
|
||||||
|
|||||||
2
tools.go
2
tools.go
@@ -1,7 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"elefant/models"
|
"gf-lt/models"
|
||||||
"fmt"
|
"fmt"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|||||||
Reference in New Issue
Block a user