Find answers from the community

s
F
Y
a
P
Updated last month

Ollama

is there change to this loader ?

β€˜β€™β€™

ollama_pack = OllamaQueryEnginePack(model="stablelm-zephyr", documents=documents)

TypeError: init() takes 1 positional argument but 2 were given#
β€˜β€™β€™
L
m
7 comments
What's the full error?
Plain Text
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/tmp/ipykernel_41001/2211308542.py in <module>
      1 # You can use any llama-hub loader to get documents!
----> 2 ollama_pack = OllamaQueryEnginePack(model="stablelm-zephyr", documents=documents)

~/Desktop/dummy/code-server/workspace/SPEED/ollama_pack/base.py in __init__(self, model, base_url, documents)
     23         self._base_url = base_url
     24 
---> 25         llm = Ollama(self._model, base_url=self._base_url)
     26 
     27         embed_model = OllamaEmbedding(model_name=self._model, base_url=self._base_url)

TypeError: __init__() takes 1 positional argument but 2 were given
tried it on my linux ubuntu and m1 mac mini
The llamapack code just needs to be updated.

Download the pack and edit the code

Plain Text
llm = Ollama(model=self_model, base_url=self._base_url)
Fairly new to python can you please elaborate on what to do exactly. Im running this on jupyter notebook
Add a reply
Sign up and join the conversation on Discord