Merge pull request 'Fixing wrong parameters' (#20) from 9month-revision-update into master

Reviewed-on: #20
This commit is contained in:
AllfatherHatt 2026-03-16 12:37:30 +01:00
commit 0053d95c4d
2 changed files with 3 additions and 6 deletions

View File

@ -34,9 +34,6 @@ class Completion:
"model": self.__model, "model": self.__model,
"messages": self.__messages, "messages": self.__messages,
"max_completion_tokens": 2000, "max_completion_tokens": 2000,
"temperature": 0.7,
"presence_penalty": 0.5,
"frequency_penalty": 0.5,
"tools": TOOLS, "tools": TOOLS,
"tool_choice": "auto", "tool_choice": "auto",
} }

View File

@ -23,7 +23,6 @@ CALLABLE_FUNCTIONS = {
DEFAULT_MODEL = "gpt-5-mini-2025-08-07" DEFAULT_MODEL = "gpt-5-mini-2025-08-07"
DEFAULT_MAX_COMPLETION_TOKENS = 2000 DEFAULT_MAX_COMPLETION_TOKENS = 2000
DEFAULT_TEMPERATURE = 0.7
class ReginaldCog(PermissionsMixin, BlacklistMixin, MemoryMixin, commands.Cog): class ReginaldCog(PermissionsMixin, BlacklistMixin, MemoryMixin, commands.Cog):
@ -223,9 +222,10 @@ class ReginaldCog(PermissionsMixin, BlacklistMixin, MemoryMixin, commands.Cog):
completion_args = { completion_args = {
"model": model, "model": model,
"messages": messages, "messages": messages,
# `max_completion_tokens` is the recommended limit field for modern/reasoning models. # Keep modern token cap field and rely on model defaults for sampling controls.
# GPT-5 family compatibility notes: temperature/top_p/logprobs are not universally
# accepted across snapshots/reasoning settings.
"max_completion_tokens": DEFAULT_MAX_COMPLETION_TOKENS, "max_completion_tokens": DEFAULT_MAX_COMPLETION_TOKENS,
"temperature": DEFAULT_TEMPERATURE,
"tools": TOOLS, "tools": TOOLS,
"tool_choice": "auto", "tool_choice": "auto",
} }