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

**URL:** <https://forum.weaviate.io/t/client-graphql-get-tries-to-use-llama3-instead-of-the-model-i-want/7611>\
**Category:** Support\
**Created:** [November 17, 2024, 2:01pm UTC](https://forum.weaviate.io/t/client-graphql-get-tries-to-use-llama3-instead-of-the-model-i-want/7611 "2024-11-17T14:01:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JCP](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jcp/32/2937_2.png) [@JCP](https://forum.weaviate.io/u/JCP)\
**Post date:** [November 17, 2024, 2:01pm UTC](https://forum.weaviate.io/t/client-graphql-get-tries-to-use-llama3-instead-of-the-model-i-want/7611/1 "2024-11-17T14:01:26Z")

</div>

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](http://github.com/weaviate/weaviate-go-client/v4@v4.16.0)  
go1.23.3

- Multitenancy?: No

Kind regards,

JC

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [November 18, 2024, 1:21pm UTC](https://forum.weaviate.io/t/client-graphql-get-tries-to-use-llama3-instead-of-the-model-i-want/7611/2 "2024-11-18T13:21:20Z")

</div>

hi @JCP !!

Welcome to our community 🤗

When you first create your collection, and specify the generative configuration, it will set some defaults for you.

This is probably your scenario. You can specify the model to use for generation while creating the collection.

Since [1.27.1](https://github.com/weaviate/weaviate/releases/tag/v1.27.1) you can also reconfigure that option, setting different generative\_config after the collection was created.

PS: This feature “dynamic RAG” - or the ability to specify different generative configurations - will eventually be available at query time.

Let me know if that helps!

Thanks!

---

<div class="post-metadata">

**Author:** ![JCP](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jcp/32/2937_2.png) [@JCP](https://forum.weaviate.io/u/JCP)\
**Post date:** [November 19, 2024, 5:45pm UTC](https://forum.weaviate.io/t/client-graphql-get-tries-to-use-llama3-instead-of-the-model-i-want/7611/3 "2024-11-19T17:45:30Z")

</div>

Hi Duda,

Thank you for your answer!

I managed to make my code work. It seems I made some error while creating the collection, and it did keep the default llama3. It now uses the right model after re-creation.

Thanks and kind regards!

JC

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [November 21, 2024, 12:35pm UTC](https://forum.weaviate.io/t/client-graphql-get-tries-to-use-llama3-instead-of-the-model-i-want/7611/4 "2024-11-21T12:35:12Z")

</div>

Oh! Glad to hear that, @JCP !

Thanks for sharing!

If you need any other help in your Weaviate journey, we are here to help!

---

<div class="post-metadata">

**Author:** ![JCP](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jcp/32/2937_2.png) [@JCP](https://forum.weaviate.io/u/JCP)\
**Post date:** [November 23, 2024, 8:03pm UTC](https://forum.weaviate.io/t/client-graphql-get-tries-to-use-llama3-instead-of-the-model-i-want/7611/5 "2024-11-23T20:03:46Z")

</div>

Thanks, sure I will!

FYI, I just posted this about the experience I had so far with your excellent product: [My first steps with Weaviate (and why I hate Python ;) )](https://forum.weaviate.io/t/my-first-steps-with-weaviate-and-why-i-hate-python/7814)

Keep up the good work!
