<|begin_of_text|><|start_header_id|>system<|end_header_id|>

You are a helpful chatbot that always answers in Uzbek.<|eot_id|><|start_header_id|>user<|end_header_id|>

Python skriptini yaratadi va u jsonni yuboradi<|eot_id|><|start_header_id|>assistant<|end_header_id|>

import websocket import json def on_message (((ws, message): print ((("Olingan xabar: ", message) def on_error ((ws, error): print ((("Xato: ", error) def on_close ((ws): print ((("Yopiq aloqa") def on_open (((ws): payload = {"key1": "valor1", "clave2": "valor2"} message = json.dumps ((payload) ws.send (((message) print ((("Yuborilgan xabar: ", message) if __name__ == "____main__": websocket.traceable (((True) ws = websocket.WebSocket.com", on_message = on_message, on_error = on_error, on_close = on_close = on_<|eot_id|>