~ Fixed the initial assistant response with tool calls not being appended
This commit is contained in:
parent
90b1640242
commit
d078b60f8f
@ -194,6 +194,11 @@ class ReginaldCog(PermissionsMixin, BlacklistMixin, MemoryMixin, commands.Cog):
|
|||||||
'tool_choice': 'auto',
|
'tool_choice': 'auto',
|
||||||
}
|
}
|
||||||
response = await client.chat.completions.create(**completion_args)
|
response = await client.chat.completions.create(**completion_args)
|
||||||
|
# Appending response with tool calls
|
||||||
|
messages.append({
|
||||||
|
'role': 'assistant',
|
||||||
|
'content': response.choices[0].message.content,
|
||||||
|
})
|
||||||
# Checking for function calls
|
# Checking for function calls
|
||||||
tool_calls = response.choices[0].message.tool_calls
|
tool_calls = response.choices[0].message.tool_calls
|
||||||
if tool_calls:
|
if tool_calls:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user