smartcomponents icon indicating copy to clipboard operation
smartcomponents copied to clipboard

[SmartTextArea] Documentation for `Parameters` parameter

Open hakenr opened this issue 1 year ago • 3 comments
trafficstars

I didn't find any documentation for this parameter.

(Also please consider renaming the parameter. Parameters parameter seems to me problematic in context of Blazor.)

hakenr avatar Mar 14 '24 21:03 hakenr

Good point.

Parameters is just an arbitrary string you can use to communicate any state or context information you want into the inference backend (it arrives as a property on the SmartTextAreaConfig shown in "customizing the prompt"). For example you might want to supply the ID of the discussion a user is participating in, and then use information based on that in the prompt on the backend so it can generate text relevant to that discussion.

However this is a bit nonobvious and perhaps advanced. The name is definitely questionable.

SteveSandersonMS avatar Mar 15 '24 12:03 SteveSandersonMS

Ah, now I get it. However, the name could be something like XyState.

BTW, if you go with ItemsProvider (#11), you probably won't need such a parameter. ;-)

hakenr avatar Mar 15 '24 15:03 hakenr

Great, thanks for confirming. I agree that some name related to 'state' makes more sense so I'll try to update it something along the lines of your suggestion.

BTW, if you go with ItemsProvider (https://github.com/dotnet-smartcomponents/smartcomponents/issues/11), you probably won't need such a parameter. ;-)

In the Blazor interactive case sure, but I'm trying to give equal consideration to Blazor SSR and MVC/Razor Pages as well.

SteveSandersonMS avatar Mar 15 '24 16:03 SteveSandersonMS