File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -85,15 +85,15 @@ def initialize_google(self):
85
85
def initialize_ollama (self ):
86
86
if self .ollama_host :
87
87
if self .verbose :
88
- print ("[Config][initialize_ollama] using cached ollama host" )
88
+ print ("[Config][initialize_ollama] using ollama host" , self . ollama_host )
89
89
else :
90
90
if self .verbose :
91
91
print (
92
92
"[Config][initialize_ollama] no cached ollama host. Assuming ollama running locally."
93
93
)
94
- self .ollama_host = os .getenv ("OLLAMA_HOST" , None )
95
- model = Client (host = self .ollama_host )
96
- return model
94
+ self .ollama_host = os .getenv ("OLLAMA_HOST" , "http://localhost:11434" )
95
+ client = Client (host = self .ollama_host )
96
+ return client
97
97
98
98
def initialize_anthropic (self ):
99
99
if self .anthropic_api_key :
Original file line number Diff line number Diff line change @@ -565,7 +565,7 @@ def call_ollama_llava(messages, model):
565
565
print (f"[call_ollama_llava] model { model } " )
566
566
time .sleep (1 )
567
567
try :
568
- model = config .initialize_ollama ()
568
+ client = config .initialize_ollama ()
569
569
screenshots_dir = "screenshots"
570
570
if not os .path .exists (screenshots_dir ):
571
571
os .makedirs (screenshots_dir )
@@ -592,7 +592,7 @@ def call_ollama_llava(messages, model):
592
592
}
593
593
messages .append (vision_message )
594
594
595
- response = ollama .chat (
595
+ response = client .chat (
596
596
model = model ,
597
597
messages = messages ,
598
598
)
You can’t perform that action at this time.
0 commit comments