diff --git a/src/connection_handler.py b/src/connection_handler.py index e32ba95..97c3585 100644 --- a/src/connection_handler.py +++ b/src/connection_handler.py @@ -1,15 +1,19 @@ # connection_handler.py -import json, requests +""" +Handles requests to remote and integrated instances of Ollama +""" +import json +import requests #OK=200 response.status_code -url = None -bearer_token = None +URL = None +BEARER_TOKEN = None def get_headers(include_json:bool) -> dict: headers = {} if include_json: headers["Content-Type"] = "application/json" - if bearer_token: - headers["Authorization"] = "Bearer {}".format(bearer_token) + if BEARER_TOKEN: + headers["Authorization"] = "Bearer {}".format(BEARER_TOKEN) return headers if len(headers.keys()) > 0 else None def simple_get(connection_url:str) -> dict: diff --git a/src/dialogs.py b/src/dialogs.py index bbf894e..18fb312 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -1,10 +1,13 @@ # dialogs.py - -from gi.repository import Adw, Gtk, Gdk, GLib, GtkSource, Gio, GdkPixbuf -import os, logging +""" +Handles UI dialogs +""" +import os +import logging from pytube import YouTube from html2text import html2text from . import connection_handler +from gi.repository import Adw, Gtk logger = logging.getLogger(__name__) # CLEAR CHAT | WORKS diff --git a/unsaved file 2 b/unsaved file 2 new file mode 100644 index 0000000..eba4878 --- /dev/null +++ b/unsaved file 2 @@ -0,0 +1,4 @@ +[MASTER] + +[TYPECHECK] +ignored-variables=_ \ No newline at end of file