Composable building blocks of AI interaction and execution in re-factor.
re-factor
, these basic prompt components make up the CompletionPrompt
type.
In the case of agents, prompts also include tools that can be used by the LLM to complete the request outlined in the system and user messages. These prompts make up the AgentPrompt
type.
system
, user
, and assistant
messages. It does not contain tools
.
UserMessage
or AssistantMessage
. This field is required and must contain at least one user message and one assistant message.system
, user
, and assistant
messages, but it differs in that it also contains a tools
parameter, which is an array of tools that can be used by the LLM to complete the request outlined in the system and user messages.
UserMessage
or AssistantMessage
. This field is required and must contain at least one user message and one assistant message.Tool
object. This field is required and must contain at least one tool."user"
.Vercel AI SDK CoreUserMessage
object."assistant"
.true
, the content
field should be omitted. If false
, the content
field should be provided.generate: true
.generate: false
.generate: true
and format: object
. Should be a valid JSONSchema Draft-07 object.generate: true
.