moved api base url into config
This commit is contained in:
parent
000b2b154c
commit
cd68cdf93c
@ -37,5 +37,8 @@
|
|||||||
"admin_nick2"
|
"admin_nick2"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"api_base": "http://localhost:11434"
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -19,7 +19,8 @@ class ollamarama:
|
|||||||
config = json.load(f)
|
config = json.load(f)
|
||||||
f.close()
|
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.personality = self.default_personality
|
||||||
|
|
||||||
self.client = AsyncClient(self.server, self.username)
|
self.client = AsyncClient(self.server, self.username)
|
||||||
@ -93,7 +94,7 @@ class ollamarama:
|
|||||||
try:
|
try:
|
||||||
#Generate response
|
#Generate response
|
||||||
response = completion(
|
response = completion(
|
||||||
api_base="http://localhost:11434",
|
api_base=self.api_base,
|
||||||
model=self.model,
|
model=self.model,
|
||||||
temperature=self.temperature,
|
temperature=self.temperature,
|
||||||
top_p=self.top_p,
|
top_p=self.top_p,
|
||||||
|
Loading…
Reference in New Issue
Block a user