-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Description
when running the notebook I am facing this issue
history has value that doesn't support encoding.
Function failed. Error: Argument 'history' has a value that doesn't support automatic encoding. Set allow_dangerously_set_content to 'True' for this argument and implement custom encoding, or provide the value as a string.
Kernel Function Selection Strategy next method failed
Traceback (most recent call last):
File "/home/vscode/.local/lib/python3.13/site-packages/semantic_kernel/agents/strategies/selection/kernel_function_selection_strategy.py", line 95, in select_agent
result = await self.function.invoke(kernel=self.kernel, arguments=arguments)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vscode/.local/lib/python3.13/site-packages/semantic_kernel/functions/kernel_function.py", line 290, in invoke
raise e
File "/home/vscode/.local/lib/python3.13/site-packages/semantic_kernel/functions/kernel_function.py", line 275, in invoke
await stack(function_context)
File "/home/vscode/.local/lib/python3.13/site-packages/semantic_kernel/functions/kernel_function_from_prompt.py", line 172, in _invoke_internal
prompt_render_result = await self._render_prompt(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vscode/.local/lib/python3.13/site-packages/semantic_kernel/functions/kernel_function_from_prompt.py", line 285, in _render_prompt
await stack(prompt_render_context)
File "/home/vscode/.local/lib/python3.13/site-packages/semantic_kernel/functions/kernel_function_from_prompt.py", line 303, in _inner_render_prompt
context.rendered_prompt = await self.prompt_template.render(context.kernel, context.arguments)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vscode/.local/lib/python3.13/site-packages/semantic_kernel/prompt_template/kernel_prompt_template.py", line 94, in render
return await self.render_blocks(self._blocks, kernel, arguments)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vscode/.local/lib/python3.13/site-packages/semantic_kernel/prompt_template/kernel_prompt_template.py", line 115, in render_blocks
arguments = self._get_trusted_arguments(arguments or KernelArguments())
File "/home/vscode/.local/lib/python3.13/site-packages/semantic_kernel/prompt_template/prompt_template_base.py", line 47, in _get_trusted_arguments
new_args[name] = self._get_encoded_value_or_default(name, value)
...
...<3 lines>...
)
NotImplementedError: Argument 'history' has a value that doesn't support automatic encoding. Set allow_dangerously_set_content to 'True' for this argument and implement custom encoding, or provide the value as a string.
Failed to select agent: Agent Failure - Strategy failed to execute function.