Code
Code content with optional rendering metadata. Use 'source' for the code text, 'language' for syntax highlighting, and 'filename' when the rendered block should show a file label. A string value in a code fiel…
Metadata
Field index
source
typestringrequiredyesdefault—
Source code text to display.
{
"source": "def greet(name: str) -> str:\n return f\"Hello, {name}!\""
}language
typestringrequirednodefault—
Language identifier used for syntax highlighting.
{
"language": "python"
}filename
typestringrequirednodefault—
Optional file label shown with the code block.
{
"filename": "app.py"
}