Skip to content

Python: Bug: [Python] - Using Non-String KernelArguments in Prompt Template function parameters fails #13199

@lavinir

Description

@lavinir

Describe the bug
When using Function Calls in a Semantic Kernel Prompt Template, and naming an injected KernelArgument to be passed to the function.
The argument is converted to a str() by the VarBlock causing the Function Invocation to fail if it expects the real type of the argument.

To Reproduce
Steps to reproduce the behavior:

  1. Create a Kernel Function that accepts a non string parameter
  2. Inject the parameter as a Kernel Argument
  3. Create a Prompt Template calling that Kernel Function with the argument
  4. Render the Prompt Template

Expected behavior
Function is called with the correct argument type. The return value from the function is what's rendered as a string in the final template.

Platform

  • Language: Python
  • Source: PIP 1.36.0

Metadata

Metadata

Labels

bugSomething isn't workingpythonPull requests for the Python Semantic Kernel

Type

Projects

Status

Bug

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions