Merge pull request #16 from h1ddenpr0cess20/dev

moved api base url into config
This commit is contained in:
Dustin 2024-05-15 20:53:11 -04:00 committed by GitHub
commit 05c38d0b31
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -37,5 +37,8 @@
"admin_nick2"
]
},
{
"api_base": "http://localhost:11434"
}
]

View File

@ -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,