p-doom/crowd-code-dataset-0.2 huggingface dataset:
[tab] slurm/dev/mihir/berlin/crowd_pilot/prompt_engineering/chat.py (python)
import requests

# SERVER_URL = "http://hai005:30000/generate"
SERVER_URL = "http://hai006:30000/v1/chat/completions"


SYSTEM_PROMPT = """
		'Output ONLY a JSON array. No prose, no code fences.',
		'Allowed actions (TypeScript-like schema):',
		"{ kind: 'showTextDocument' }",
		"{ kind: 'setSelections', selections: Array<{ start: [number, number], end: [number, number] }> }",
		"{ kind: 'editInsert', position: [number, number], text: string }",
		"{ kind: 'terminalShow' }",
		"{ kind: 'terminalSendText', text: string }",
		'Coordinates are zero-based [line, column].'
"""

demoGoal = """
		'Create a concise demo plan that:',y
		'- focuses the active text document',y
		'- moves the cursor to (0, 0)',y
		"- inserts the line \"hello from model\
\" at (0, 0)",y
		'- focuses the terminal',y
		'- runs the command "echo model run"'

"""



def chat():

    payload = {
        "model": "Qwen/Qwen3-0.6B",
        "messages": [
            {"role": "system", "content": SYSTEM_PROMPT},
            {"role": "user", "content": demoGoal}
        ],
    }

    response = requests.post(SERVER_URL, json=payload)
    if response.status_code == 200:
        return response.json().get("choices", [{}])[0].get("message", {}).get("content", "")
    else:
        return f"Error: {response.status_code} - {response.text}"


if __name__ == "__main__":
    reply = chat()
    print(reply)