Skip to content

Commit

Permalink
Merge pull request #15 from StacklokLabs/embed-host
Browse files Browse the repository at this point in the history
Add an individual host entry for embeddings
  • Loading branch information
lukehinds authored Nov 11, 2024
2 parents 8004732 + fd6e1b5 commit 43820a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion examples/ollama/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (

var (
ollamaHost = "http://localhost:11434"
ollamaEmdHost = "http://localhost:11434"
ollamaEmbModel = "mxbai-embed-large"
ollamaGenModel = "llama3"
databaseURL = "postgres://user:password@localhost:5432/dbname?sslmode=disable"
Expand All @@ -20,7 +21,7 @@ var (
func main() {

// Configure the Ollama backend for both embedding and generation
embeddingBackend := backend.NewOllamaBackend(ollamaHost, ollamaEmbModel, time.Duration(10*time.Second))
embeddingBackend := backend.NewOllamaBackend(ollamaEmdHost, ollamaEmbModel, time.Duration(10*time.Second))
log.Printf("Embedding backend LLM: %s", ollamaEmbModel)

generationBackend := backend.NewOllamaBackend(ollamaHost, ollamaGenModel, time.Duration(10*time.Second))
Expand Down
3 changes: 2 additions & 1 deletion examples/qdrant/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (

var (
ollamaHost = "http://localhost:11434"
ollamaEmdHost = "http://localhost:11434"
ollamaEmbModel = "mxbai-embed-large"
ollamaGenModel = "llama3"
// databaseURL = "postgres://user:password@localhost:5432/dbname?sslmode=disable"
Expand All @@ -22,7 +23,7 @@ func main() {
// Initialize Qdrant vector connection

// Configure the Ollama backend for both embedding and generation
embeddingBackend := backend.NewOllamaBackend(ollamaHost, ollamaEmbModel, time.Duration(10*time.Second))
embeddingBackend := backend.NewOllamaBackend(ollamaEmdHost, ollamaEmbModel, time.Duration(10*time.Second))
log.Printf("Embedding backend LLM: %s", ollamaEmbModel)

generationBackend := backend.NewOllamaBackend(ollamaHost, ollamaGenModel, time.Duration(10*time.Second))
Expand Down

0 comments on commit 43820a1

Please sign in to comment.