From cd68cdf93c9e543a85c280b129b30e84692db6cb Mon Sep 17 00:00:00 2001 From: Dustin Date: Wed, 15 May 2024 20:52:37 -0400 Subject: [PATCH] moved api base url into config --- config.json | 3 +++ ollamarama.py | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config.json b/config.json index 29a1cb8..1a1c7c0 100644 --- a/config.json +++ b/config.json @@ -37,5 +37,8 @@ "admin_nick2" ] + }, + { + "api_base": "http://localhost:11434" } ] \ No newline at end of file diff --git a/ollamarama.py b/ollamarama.py index f1b8cea..7695a3a 100644 --- a/ollamarama.py +++ b/ollamarama.py @@ -19,7 +19,8 @@ class ollamarama: config = json.load(f) f.close() - self.server, self.username, self.password, self.channels, self.default_personality, self.admins = config[1].values() + self.server, self.username, self.password, self.channels, self.default_personality, self.admins = config[1].values() + self.api_base = config[2]['api_base'] self.personality = self.default_personality self.client = AsyncClient(self.server, self.username) @@ -93,7 +94,7 @@ class ollamarama: try: #Generate response response = completion( - api_base="http://localhost:11434", + api_base=self.api_base, model=self.model, temperature=self.temperature, top_p=self.top_p,