taguette pre-process
This commit is contained in:
16
utils.py
16
utils.py
@@ -76,11 +76,15 @@ def connect_qumo_ollama(vm_name: str ='ollama-lite') -> Client:
|
||||
client = Client(
|
||||
host=QUMO_OLLAMA_URL
|
||||
)
|
||||
|
||||
print(f"Connection succesful. WebUI available at: http://{vm_name}.tail44fa00.ts.net:3000\nAvailable models:")
|
||||
for m in client.list().models:
|
||||
print(f" - '{m.model}' ")
|
||||
return client
|
||||
|
||||
except requests.ConnectionError:
|
||||
print(f"Failed to reach {QUMO_OLLAMA_URL}. Check that the VM is running and Tailscale is up")
|
||||
|
||||
print(f"Connection succesful. WebUI available at: http://{vm_name}.tail44fa00.ts.net:3000\nAvailable models:")
|
||||
for m in client.list().models:
|
||||
print(f" - '{m.model}' ")
|
||||
return client
|
||||
pass
|
||||
|
||||
print(f"Failed to reach {QUMO_OLLAMA_URL}. Check that the VM is running and Tailscale is up")
|
||||
return None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user