Skip to content

Commit

Permalink
backend: change model back and print elapsed time
Browse files Browse the repository at this point in the history
  • Loading branch information
NickSavage committed Nov 21, 2024
1 parent e8552fc commit b7970da
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion go-backend/llms/embeddings.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func GenerateEmbeddings(chunk models.CardChunk, useForQuery bool) ([]pgvector.Ve
}

payload := map[string]string{
"model": "nomic-embed-text",
"model": "mxbai-embed-large",
"prompt": prompt,
}

Expand Down
7 changes: 6 additions & 1 deletion go-backend/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ import (
// "bytes"
"context"
//"encoding/json"
"fmt"
"go-backend/handlers"
"go-backend/models"
"go-backend/server"
"log"
"net/http"
"os"
// "time"
"time"

"github.com/golang-jwt/jwt/v4"
"github.com/gorilla/mux"
Expand Down Expand Up @@ -136,6 +137,7 @@ func main() {

if os.Getenv("ZETTEL_RUN_CHUNKING_EMBEDDING") == "true" {
go func() {
start := time.Now()
cards, _ := h.QueryFullCards(1, "")
for _, card := range cards {
err := h.ChunkCard(card)
Expand All @@ -149,6 +151,9 @@ func main() {
break
}
}
elapsed := time.Since(start)

fmt.Printf("Operation took %v\n", elapsed)

}()

Expand Down

0 comments on commit b7970da

Please sign in to comment.