kor TürkçeGitHub

PromptField

Takes an instruction for an AI assistant.

kor/ui/PromptFieldSource

When to use

  • Connect it to your own AI service. The control sends nothing by itself.

Examples

Ask about orders

Loading the example

<k:PromptField placeholder="Ask about your orders" maxLength="300" note="Answers may contain mistakes." submit=".onSubmit">
	<core:Item xmlns:core="sap.ui.core" text="Which orders are late?"/>
	<core:Item xmlns:core="sap.ui.core" text="Summarize this week"/>
</k:PromptField>

API

Properties

NameTypeDefaultDescription
valuestringText
labelstringAccessible name
placeholderstringPlaceholder
maxLengthint0Maximum characters. Zero means unlimited
workingbooleanfalseWhether an answer is being produced. Shows stop instead of send
notestringNote below the box, such as an accuracy warning
clearOnSubmitbooleantrueWhether the box is cleared after sending
enabledbooleantrueWhether the control is enabled

Aggregations

NameTypeDescription
suggestionssap.ui.core.Item[]Ready prompts, shown while the box is empty

Events

NameTypeDescription
submitvalue: stringThe prompt was sent
stopStop was requested
liveChangevalue: stringFired on every key

Related

TextFieldCommandPalette