Learn how to create a simple spell in Magick
content
: The input text content to generate text fromsystem
: Specifies the system prompt or context for the text generation model for exampe “Always output your response in JSON format with the keys “myProperty1”, “myProperty2”, “myProperty3”.prompt
: The main prompt or instruction for generating the desired text. In our example this will be what ever we type into the Test Panel.temperature
: Controls the randomness of generated text (set to 0.5)maxRetries
: Maximum number of retries for generation (set to 3)top_p
: Nucleus sampling probability threshold (set to 1)seed
: Sets the random seed for reproducibility (set to 42)maxTokens
: Maximum number of tokens to generate (set to 256)response
: The generated text outputcompletionResponse
: The full response object from the text generation model, which can be used for debugging and more complex processingstream
: The generated text output as a stream message.done
: The flow output socket used to connect to other Nodes once the process has finished.onStream
Another flow output that fires events per streamed token.