Skip to content

Custom function invocation of LambdaLLMFunction invokes toString on parameters #150

Description

@thjaeckle

Hello there.

I encountered an issue which points back to this place:

function.invoke(context, parameters.parameters.map { p -> input[p.name]?.let { "$it" } })

When I want to provide an "object" or an "array" parameter to a function, the "$it" will cause calling toString() on the function input parameter.
If the function input parameter is however an object, we e.g. have an implementation of a LinkedHashMap at this point (probably due to some Jackson magic converting JSON object to a map) which will not convert it to JSON, but print the string format of the map instead.

Maybe the wrapping in a string is not a good idea here, as one does not have explicit control over "toString()" of input arguments there.
But maybe I miss something and I can control what kind of objects are provided as input?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions