From a809d8523ac0af368e13bb7a189d051266797aa0 Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Tue, 16 Jan 2024 11:24:27 +0100 Subject: [PATCH] Update main.py Bugfix --- ollama_proxy_server/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ollama_proxy_server/main.py b/ollama_proxy_server/main.py index 5686c2c..5a01ca5 100644 --- a/ollama_proxy_server/main.py +++ b/ollama_proxy_server/main.py @@ -93,7 +93,7 @@ def main(): if not self._validate_user_and_key(): ASCIIColors.red(f'User is not authorized') client_ip, client_port = self.client_address - self.add_access_log_entry(user="unknown", ip_address=client_ip, "Denied", "None") + self.add_access_log_entry(user="unknown", ip_address=client_ip, access="Denied", server="None") self.send_response(403) self.end_headers() return @@ -120,7 +120,7 @@ def main(): # Apply the queuing mechanism only for a specific endpoint. if path == '/api/generate': que = min_queued_server[1]['queue'] - self.add_access_log_entry(user=self.user, ip_address=client_ip, "Authorized", min_queued_server[0]) + self.add_access_log_entry(user=self.user, ip_address=client_ip, access="Authorized", server=min_queued_server[0]) que.put_nowait(1) try: response = requests.request(self.command, min_queued_server[1]['url'] + path, params=get_params, data=post_params)