get_thread => find_thread
All checks were successful
Build and Publish college-bot-v2 / build_and_publish (push) Successful in 14s
All checks were successful
Build and Publish college-bot-v2 / build_and_publish (push) Successful in 14s
This commit is contained in:
parent
37bb148e8e
commit
0d05d68cba
1 changed files with 3 additions and 4 deletions
|
@ -529,7 +529,7 @@ class Ollama(commands.Cog):
|
|||
return await ctx.respond("No servers available. Please try again later.")
|
||||
system_query = None
|
||||
if context is not None:
|
||||
if not self.history.get_thread(context):
|
||||
if not self.history.find_thread(context):
|
||||
await ctx.respond("Invalid context key.")
|
||||
return
|
||||
|
||||
|
@ -755,8 +755,7 @@ class Ollama(commands.Cog):
|
|||
|
||||
if context is None:
|
||||
context = self.history.create_thread(ctx.user, system_query)
|
||||
elif context is not None and self.history.get_thread(context) is None:
|
||||
__thread = self.history.find_thread(context)
|
||||
elif context is not None and (__thread := self.history.find_thread(context)) is None:
|
||||
if not __thread:
|
||||
return await ctx.respond("Invalid thread ID.")
|
||||
else:
|
||||
|
@ -768,7 +767,7 @@ class Ollama(commands.Cog):
|
|||
user_message["images"] = [image_data]
|
||||
messages.append(user_message)
|
||||
|
||||
params = {"seed": self.history.get_thread(context)["seed"]}
|
||||
params = {"seed": self.history.find_thread(context)["seed"]}
|
||||
if give_acid is True:
|
||||
params["temperature"] = 2
|
||||
params["top_k"] = 0
|
||||
|
|
Loading…
Reference in a new issue