Referencia › AI — 4 comandos


promptai

ai

Entrada: prompt (word or list)
Salida: none

Initializes an AI session with role or behavior instructions. The prompt defines how the AI should behave in subsequent interactions. The session is stored internally for use by other AI commands. See instructai, interactai, askai, resetai

promptai |You are playing a game of five-card poker. The cards are represented by two characters, the number of the card and the suit, eg 3H for three of hearts.|

instructai

ai

Entrada: state (word or list)
Salida: none

Sends state information to the current AI session. Use this to inform the AI about the current turtleSpaces environment or any relevant context. Requires an active AI session (call promptai first). See promptai, interactai, resetai

instructai [The turtle is at position 0 0 0 facing north.]

interactai

ai

Entrada: prompt (word or list)
Salida: list

Sends a prompt to the AI and receives Logo code or data in response. The AI response is parsed as Logo code and returned as a list that can be run or processed. Requires an active AI session (call promptai first). See promptai, instructai, resetai

make "discard interactai (
      phrase |Here are your cards:| :p1
      |. Select the cards to replace by their names (eg AS).|
)

resetai

ai

Entrada: none
Salida: none

Ends and deletes the current AI session. Has no effect if no session is active. Use this to start fresh with a new AI context. See promptai, instructai, interactai

resetai