Quantcast
Channel: Weaviate Community Forum - Latest posts
Viewing all articles
Browse latest Browse all 3590

client.GraphQL().Get() tries to use llama3 instead of the model I want

$
0
0

Hi all,

I’m trying to build a simple RAG application in Golang. Everything is working fine, except when I try to get data for the final inference: client.GraphQL().Get() tries to use llama3 instead of the model I want.
I surely missed something as llama3 is the default model, but I could not find where I forgot to indicate the right model to be used.

Description

Local Weaviate built from sources
Local Ollama server

  • I created a class with this code:
    classObj := &models.Class{
    Class: className,
    Vectorizer: “text2vec-ollama”,
    ModuleConfig: map[string]interface{}{
    “text2vec-ollama”: map[string]interface{}{ // Configure the Ollama embedding integration
    “apiEndpoint”: weaviateOllamaURL, // Allow Weaviate from within a Docker container to contact your Ollama instance
    “model”: ollamaEmbeddingModel, // The model to use
    },
    “generative-ollama”: map[string]interface{}{ // Configure the Ollama generative integration
    “apiEndpoint”: weaviateOllamaURL, // Allow Weaviate from within a Docker container to contact your Ollama instance
    “model”: ollamaModel, // The model to use
    },
    },
    }
    err = client.Schema().ClassCreator().WithClass(classObj).Do(ctx)

  • I added data with this code:
    _, err := client.Data().Creator().
    WithClassName(className).
    WithProperties(map[string]interface{}{
    “Title”: braveResponse.Web.Results[r].Title,
    “URL”: braveResponse.Web.Results[r].URL,
    “Content”: resp.Response,
    }).
    Do(ctx)

  • Finally I get the data with this code:
    gs := graphql.NewGenerativeSearch().GroupedResult(prompt)
    response, err := client.GraphQL().Get().
    WithClassName(className).
    WithFields(
    graphql.Field{Name: “title”},
    graphql.Field{Name: “content”},
    ).
    WithGenerativeSearch(gs).
    WithNearText((&graphql.NearTextArgumentBuilder{}).
    WithConcepts(string{concepts})).
    WithLimit(200).
    Do(ctx)

  • Here I get an error as Weaviate tries to use llama3. As workaround I had to do this:
    ollama cp qwen2.5:7b “llama3”, but this is dirty and not handy.

Server Setup Information

  • Weaviate Server Version: latest (git cloned yesterday)
    build_wv_version=1.28.0-dev

  • Deployment Method: local, build from sources, and started with:
    ./tools/dev/run_dev_server.sh local-ollama
    I even edited the script:
    local-ollama)
    AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED=true
    DEFAULT_VECTORIZER_MODULE=text2vec-ollama
    ENABLE_MODULES=“text2vec-ollama,generative-ollama”
    OLLAMA_MODEL=“qwen2.5:7b”
    go_run ./cmd/weaviate-server
    –scheme http
    –host “127.0.0.1”
    –port 8080
    –read-timeout=600s
    –write-timeout=600s
    ;;

  • Multi Node? No

  • Client Language and Version:
    github.com/weaviate/weaviate-go-client/v4@v4.16.0
    go1.23.3

  • Multitenancy?: No

Kind regards,

JC


Viewing all articles
Browse latest Browse all 3590

Trending Articles