Last active
June 28, 2025 16:53
-
-
Save dmarx/08afeb669cdc2f974d6aca61dcce360d to your computer and use it in GitHub Desktop.
Schema inferred from ChatGPT conversations.json data export
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{'$schema': 'http://json-schema.org/schema#', | |
'type': 'array', | |
'items': {'type': 'object', | |
'properties': {'mapping': {'type': 'object', | |
'patternProperties': {'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$': {'type': 'object', | |
'properties': {'id': {'type': 'string'}, | |
'message': {'anyOf': [{'type': 'null'}, | |
{'type': 'object', | |
'properties': {'id': {'type': 'string'}, | |
'author': {'type': 'object', | |
'properties': {'role': {'type': 'string'}, | |
'name': {'type': ['null', 'string']}, | |
'metadata': {'type': 'object', | |
'properties': {'real_author': {'type': 'string'}}}}, | |
'required': ['metadata', 'name', 'role']}, | |
'create_time': {'type': ['null', 'number']}, | |
'update_time': {'type': ['null', 'number']}, | |
'content': {'type': 'object', | |
'properties': {'content_type': {'type': 'string'}, | |
'parts': {'type': 'array', | |
'items': {'anyOf': [{'type': 'string'}, | |
{'type': 'object', | |
'properties': {'content_type': {'type': 'string'}, | |
'asset_pointer': {'type': 'string'}, | |
'size_bytes': {'type': 'integer'}, | |
'width': {'type': 'integer'}, | |
'height': {'type': 'integer'}, | |
'fovea': {'type': ['integer', 'null']}, | |
'metadata': {'anyOf': [{'type': 'null'}, | |
{'type': 'object', | |
'properties': {'dalle': {'anyOf': [{'type': 'null'}, | |
{'type': 'object', | |
'properties': {'gen_id': {'type': 'string'}, | |
'prompt': {'type': 'string'}, | |
'seed': {'type': ['integer', 'null']}, | |
'parent_gen_id': {'type': ['null', 'string']}, | |
'edit_op': {'type': ['null', 'string']}, | |
'serialization_title': {'type': 'string'}}, | |
'required': ['edit_op', | |
'gen_id', | |
'parent_gen_id', | |
'prompt', | |
'seed', | |
'serialization_title']}]}, | |
'gizmo': {'type': 'null'}, | |
'generation': {'anyOf': [{'type': 'null'}, | |
{'type': 'object', | |
'properties': {'gen_id': {'type': 'string'}, | |
'gen_size': {'type': 'string'}, | |
'seed': {'type': 'null'}, | |
'parent_gen_id': {'type': 'null'}, | |
'height': {'type': 'integer'}, | |
'width': {'type': 'integer'}, | |
'transparent_background': {'type': 'boolean'}, | |
'serialization_title': {'type': 'string'}}, | |
'required': ['gen_id', | |
'gen_size', | |
'height', | |
'parent_gen_id', | |
'seed', | |
'serialization_title', | |
'transparent_background', | |
'width']}]}, | |
'container_pixel_height': {'type': ['integer', 'null']}, | |
'container_pixel_width': {'type': ['integer', 'null']}, | |
'emu_omit_glimpse_image': {'type': 'null'}, | |
'emu_patches_override': {'type': 'null'}, | |
'sanitized': {'type': 'boolean'}, | |
'asset_pointer_link': {'type': 'null'}, | |
'watermarked_asset_pointer': {'type': 'null'}, | |
'start_timestamp': {'type': 'null'}, | |
'end_timestamp': {'type': 'null'}, | |
'pretokenized_vq': {'type': 'null'}, | |
'interruptions': {'type': 'null'}, | |
'original_audio_source': {'type': 'null'}, | |
'transcription': {'type': 'null'}, | |
'word_transcription': {'type': 'null'}, | |
'start': {'type': 'number'}, | |
'end': {'type': 'number'}}}]}, | |
'expiry_datetime': {'type': 'null'}, | |
'frames_asset_pointers': {'type': 'array'}, | |
'video_container_asset_pointer': {'type': 'null'}, | |
'audio_asset_pointer': {'type': 'object', | |
'properties': {'expiry_datetime': {'type': 'null'}, | |
'content_type': {'type': 'string'}, | |
'asset_pointer': {'type': 'string'}, | |
'size_bytes': {'type': 'integer'}, | |
'format': {'type': 'string'}, | |
'metadata': {'type': 'object', | |
'properties': {'start_timestamp': {'type': 'null'}, | |
'end_timestamp': {'type': 'null'}, | |
'pretokenized_vq': {'type': 'null'}, | |
'interruptions': {'type': 'null'}, | |
'original_audio_source': {'type': 'null'}, | |
'transcription': {'type': 'null'}, | |
'word_transcription': {'type': 'null'}, | |
'start': {'type': 'number'}, | |
'end': {'type': 'number'}}, | |
'required': ['end', | |
'end_timestamp', | |
'interruptions', | |
'original_audio_source', | |
'pretokenized_vq', | |
'start', | |
'start_timestamp', | |
'transcription', | |
'word_transcription']}}, | |
'required': ['asset_pointer', | |
'content_type', | |
'expiry_datetime', | |
'format', | |
'metadata', | |
'size_bytes']}, | |
'audio_start_timestamp': {'type': 'number'}, | |
'text': {'type': 'string'}, | |
'direction': {'type': 'string'}, | |
'decoding_id': {'type': 'null'}, | |
'format': {'type': 'string'}}, | |
'required': ['content_type']}]}}, | |
'language': {'type': 'string'}, | |
'response_format_name': {'type': 'null'}, | |
'text': {'type': 'string'}, | |
'thoughts': {'type': 'array', | |
'items': {'type': 'object', | |
'properties': {'summary': {'type': 'string'}, | |
'content': {'type': 'string'}}, | |
'required': ['content', 'summary']}}, | |
'source_analysis_msg_id': {'type': 'string'}, | |
'content': {'type': 'string'}, | |
'result': {'type': 'string'}, | |
'summary': {'type': ['null', 'string']}, | |
'assets': {'type': 'array'}, | |
'tether_id': {'type': 'null'}, | |
'url': {'type': 'string'}, | |
'domain': {'type': 'string'}, | |
'title': {'type': 'string'}, | |
'snippet': {'type': 'string'}, | |
'pub_date': {'type': 'null'}, | |
'crawl_date': {'type': 'null'}, | |
'pub_timestamp': {'type': 'number'}, | |
'ref_id': {'type': 'string'}, | |
'name': {'type': 'string'}}, | |
'required': ['content_type']}, | |
'status': {'type': 'string'}, | |
'end_turn': {'type': ['boolean', 'null']}, | |
'weight': {'type': 'number'}, | |
'metadata': {'type': 'object', | |
'properties': {'is_visually_hidden_from_conversation': {'type': 'boolean'}, | |
'selected_sources': {'type': 'array', | |
'items': {'type': 'string'}}, | |
'selected_github_repos': {'type': 'array'}, | |
'serialization_metadata': {'type': 'object', | |
'properties': {'custom_symbol_offsets': {'type': 'array', | |
'items': {'type': 'object', | |
'properties': {'symbol': {'type': 'string'}, | |
'startIndex': {'type': 'integer'}, | |
'endIndex': {'type': 'integer'}}, | |
'required': ['endIndex', 'startIndex', 'symbol']}}}, | |
'required': ['custom_symbol_offsets']}, | |
'request_id': {'type': ['null', 'string']}, | |
'message_source': {'type': 'null'}, | |
'timestamp_': {'type': 'string'}, | |
'message_type': {'type': ['null', 'string']}, | |
'model_slug': {'type': 'string'}, | |
'default_model_slug': {'type': 'string'}, | |
'parent_id': {'type': 'string'}, | |
'is_complete': {'type': 'boolean'}, | |
'finish_details': {'type': 'object', | |
'properties': {'type': {'type': 'string'}, | |
'stop_tokens': {'type': 'array', 'items': {'type': 'integer'}}, | |
'stop': {'type': 'string'}}, | |
'required': ['type']}, | |
'sonic_classification_result': {'type': 'object', | |
'properties': {'latency_ms': {'type': ['null', 'number']}, | |
'search_prob': {'type': ['null', 'number']}, | |
'force_search_threshold': {'type': ['null', 'number']}, | |
'classifier_config_name': {'type': 'string'}}, | |
'required': ['latency_ms', 'search_prob']}, | |
'citations': {'type': 'array', | |
'items': {'type': 'object', | |
'properties': {'start_ix': {'type': 'integer'}, | |
'end_ix': {'type': 'integer'}, | |
'invalid_reason': {'type': 'string'}, | |
'citation_format_type': {'type': 'string'}, | |
'metadata': {'type': 'object', | |
'properties': {'type': {'type': 'string'}, | |
'title': {'type': 'string'}, | |
'url': {'type': 'string'}, | |
'text': {'type': 'string'}, | |
'pub_date': {'type': ['null', 'string']}, | |
'extra': {'anyOf': [{'type': 'null'}, | |
{'type': 'object', | |
'properties': {'cited_message_idx': {'type': 'integer'}, | |
'search_result_idx': {'type': ['integer', 'null']}, | |
'evidence_text': {'type': 'string'}, | |
'cloud_doc_url': {'type': 'null'}}, | |
'required': ['cited_message_idx', 'evidence_text']}]}, | |
'og_tags': {'type': 'null'}}, | |
'required': ['extra', | |
'pub_date', | |
'text', | |
'title', | |
'type', | |
'url']}}, | |
'required': ['end_ix', 'start_ix']}}, | |
'content_references': {'type': 'array', | |
'items': {'type': 'object', | |
'properties': {'matched_text': {'type': 'string'}, | |
'start_idx': {'type': 'integer'}, | |
'end_idx': {'type': 'integer'}, | |
'refs': {'type': 'array', | |
'items': {'anyOf': [{'type': 'string'}, | |
{'type': 'object', | |
'properties': {'turn_index': {'type': 'integer'}, | |
'ref_type': {'type': 'string'}, | |
'ref_index': {'type': 'integer'}}, | |
'required': ['ref_index', 'ref_type', 'turn_index']}]}}, | |
'alt': {'type': ['null', 'string']}, | |
'prompt_text': {'type': ['null', 'string']}, | |
'type': {'type': 'string'}, | |
'invalid': {'type': 'boolean'}, | |
'safe_urls': {'type': 'array', 'items': {'type': 'string'}}, | |
'attributable_index': {'type': 'string'}, | |
'attributions': {'type': 'null'}, | |
'attributions_debug': {'type': 'null'}, | |
'items': {'type': 'array', | |
'items': {'type': 'object', | |
'properties': {'title': {'type': 'string'}, | |
'url': {'type': 'string'}, | |
'pub_date': {'type': ['null', 'number']}, | |
'snippet': {'type': ['null', 'string']}, | |
'attribution_segments': {'anyOf': [{'type': 'null'}, | |
{'type': 'array', 'items': {'type': 'string'}}]}, | |
'supporting_websites': {'type': 'array', | |
'items': {'type': 'object', | |
'properties': {'title': {'type': 'string'}, | |
'url': {'type': 'string'}, | |
'pub_date': {'type': ['null', 'number']}, | |
'snippet': {'type': 'string'}, | |
'attribution': {'type': 'string'}}, | |
'required': ['attribution', | |
'pub_date', | |
'snippet', | |
'title', | |
'url']}}, | |
'refs': {'type': 'array', | |
'items': {'type': 'object', | |
'properties': {'turn_index': {'type': 'integer'}, | |
'ref_type': {'type': 'string'}, | |
'ref_index': {'type': 'integer'}}, | |
'required': ['ref_index', 'ref_type', 'turn_index']}}, | |
'hue': {'type': 'null'}, | |
'attributions': {'type': 'null'}, | |
'attribution': {'type': 'string'}}, | |
'required': ['pub_date', 'snippet', 'title', 'url']}}, | |
'status': {'type': 'string'}, | |
'error': {'type': 'null'}, | |
'style': {'type': ['null', 'string']}, | |
'sources': {'type': 'array', | |
'items': {'type': 'object', | |
'properties': {'title': {'type': 'string'}, | |
'url': {'type': 'string'}, | |
'attribution': {'type': 'string'}}, | |
'required': ['attribution', 'title', 'url']}}, | |
'has_images': {'type': 'boolean'}, | |
'images': {'type': 'array', | |
'items': {'type': 'object', | |
'properties': {'url': {'type': 'string'}, | |
'content_url': {'type': 'string'}, | |
'thumbnail_url': {'type': 'string'}, | |
'title': {'type': 'string'}, | |
'content_size': {'type': 'object', | |
'properties': {'width': {'type': 'integer'}, | |
'height': {'type': 'integer'}}, | |
'required': ['height', 'width']}, | |
'thumbnail_size': {'type': 'object', | |
'properties': {'width': {'type': 'integer'}, | |
'height': {'type': 'integer'}}, | |
'required': ['height', 'width']}, | |
'thumbnail_crop_info': {'type': 'null'}, | |
'attribution': {'type': 'string'}}, | |
'required': ['attribution', | |
'content_size', | |
'content_url', | |
'thumbnail_crop_info', | |
'thumbnail_size', | |
'thumbnail_url', | |
'title', | |
'url']}}, | |
'title': {'type': 'string'}, | |
'url': {'type': 'string'}, | |
'pub_date': {'type': ['null', 'number']}, | |
'snippet': {'type': 'string'}, | |
'attribution': {'type': 'string'}, | |
'icon_type': {'type': 'null'}}, | |
'required': ['end_idx', 'matched_text', 'start_idx', 'type']}}, | |
'command': {'type': 'string'}, | |
'status': {'type': 'string'}, | |
'search_source': {'type': 'string'}, | |
'client_reported_search_source': {'type': ['null', 'string']}, | |
'debug_sonic_thread_id': {'type': 'string'}, | |
'search_result_groups': {'type': 'array', | |
'items': {'type': 'object', | |
'properties': {'type': {'type': 'string'}, | |
'domain': {'type': 'string'}, | |
'entries': {'type': 'array', | |
'items': {'type': 'object', | |
'properties': {'type': {'type': 'string'}, | |
'url': {'type': 'string'}, | |
'title': {'type': 'string'}, | |
'snippet': {'type': 'string'}, | |
'ref_id': {'anyOf': [{'type': 'null'}, | |
{'type': 'object', | |
'properties': {'turn_index': {'type': 'integer'}, | |
'ref_type': {'type': 'string'}, | |
'ref_index': {'type': 'integer'}}, | |
'required': ['ref_index', 'ref_type', 'turn_index']}]}, | |
'content_type': {'type': 'null'}, | |
'pub_date': {'type': ['null', 'number']}, | |
'attributions': {'type': 'null'}, | |
'attribution': {'type': 'string'}, | |
'attributions_debug': {'type': 'null'}}, | |
'required': ['pub_date', | |
'ref_id', | |
'snippet', | |
'title', | |
'type', | |
'url']}}}, | |
'required': ['domain', 'entries', 'type']}}, | |
'safe_urls': {'type': 'array', 'items': {'type': 'string'}}, | |
'message_locale': {'type': 'string'}, | |
'image_results': {'type': 'array', | |
'items': {'type': 'object', | |
'properties': {'url': {'type': 'string'}, | |
'content_url': {'type': 'string'}, | |
'thumbnail_url': {'type': 'string'}, | |
'title': {'type': 'string'}, | |
'content_size': {'type': 'object', | |
'properties': {'width': {'type': 'integer'}, | |
'height': {'type': 'integer'}}, | |
'required': ['height', 'width']}, | |
'thumbnail_size': {'type': 'object', | |
'properties': {'width': {'type': 'integer'}, | |
'height': {'type': 'integer'}}, | |
'required': ['height', 'width']}, | |
'thumbnail_crop_info': {'type': 'null'}, | |
'attribution': {'type': 'string'}}, | |
'required': ['attribution', | |
'content_size', | |
'content_url', | |
'thumbnail_crop_info', | |
'thumbnail_size', | |
'thumbnail_url', | |
'title', | |
'url']}}, | |
'rebase_developer_message': {'type': 'boolean'}, | |
'reasoning_status': {'type': 'string'}, | |
'search_queries': {'type': 'array', | |
'items': {'type': 'object', | |
'properties': {'type': {'type': 'string'}, | |
'q': {'type': 'string'}}, | |
'required': ['q', 'type']}}, | |
'search_display_string': {'type': 'string'}, | |
'searched_display_string': {'type': 'string'}, | |
'finished_duration_sec': {'type': 'integer'}, | |
'canvas': {'type': 'object', | |
'properties': {'textdoc_id': {'type': 'string'}, | |
'textdoc_type': {'type': 'string'}, | |
'version': {'type': 'integer'}, | |
'title': {'type': 'string'}, | |
'create_source': {'type': 'string'}, | |
'from_version': {'type': 'integer'}, | |
'textdoc_content_length': {'type': 'integer'}, | |
'user_message_type': {'type': 'string'}, | |
'selection_metadata': {'type': 'object', | |
'properties': {'selection_type': {'type': 'string'}, | |
'selection_position_range': {'type': 'object', | |
'properties': {'start': {'type': 'integer'}, | |
'end': {'type': 'integer'}}, | |
'required': ['end', 'start']}}, | |
'required': ['selection_position_range', 'selection_type']}, | |
'comment_ids': {'type': 'array', 'items': {'type': 'string'}}, | |
'has_user_edit': {'type': 'boolean'}, | |
'is_failure': {'type': 'boolean'}}}, | |
'targeted_reply': {'type': 'string'}, | |
'targeted_reply_label': {'type': 'string'}, | |
'attachments': {'type': 'array', | |
'items': {'type': 'object', | |
'properties': {'id': {'type': 'string'}, | |
'size': {'type': 'integer'}, | |
'name': {'type': 'string'}, | |
'mime_type': {'type': 'string'}, | |
'width': {'type': 'integer'}, | |
'height': {'type': 'integer'}, | |
'mimeType': {'type': 'string'}}, | |
'required': ['id', 'name']}}, | |
'caterpillar_selected_sources': {'type': 'array', | |
'items': {'type': 'string'}}, | |
'gizmo_id': {'type': ['null', 'string']}, | |
'rebase_system_message': {'type': 'boolean'}, | |
'category_suggestions': {'type': 'array', | |
'items': {'type': 'object', | |
'properties': {'title': {'type': 'string'}, | |
'category_id': {'type': 'string'}, | |
'suggestions': {'anyOf': [{'type': 'null'}, | |
{'type': 'array', | |
'items': {'type': 'object', | |
'properties': {'title': {'type': 'null'}, | |
'description': {'type': 'string'}, | |
'prompt': {'type': 'string'}, | |
'system_hint': {'type': 'string'}, | |
'category_id': {'type': 'string'}, | |
'cta_label': {'type': 'null'}, | |
'image_url': {'type': 'null'}, | |
'model_override': {'type': 'null'}, | |
'id': {'type': 'string'}}, | |
'required': ['category_id', | |
'cta_label', | |
'description', | |
'id', | |
'prompt', | |
'system_hint', | |
'title']}}]}, | |
'style': {'type': 'string'}}, | |
'required': ['category_id', 'suggestions', 'title']}}, | |
'finished_text': {'type': 'string'}, | |
'initial_text': {'type': 'string'}, | |
'_cite_metadata': {'type': 'object', | |
'properties': {'citation_format': {'type': 'object', | |
'properties': {'name': {'type': 'string'}, | |
'regex': {'type': 'string'}}, | |
'required': ['name']}, | |
'metadata_list': {'type': 'array', | |
'items': {'type': 'object', | |
'properties': {'type': {'type': 'string'}, | |
'title': {'type': 'string'}, | |
'url': {'type': 'string'}, | |
'text': {'type': 'string'}, | |
'pub_date': {'type': ['null', 'string']}, | |
'extra': {'type': 'null'}, | |
'og_tags': {'type': 'null'}, | |
'name': {'type': 'string'}, | |
'id': {'type': 'string'}, | |
'source': {'type': 'string'}}, | |
'required': ['extra', 'text', 'type']}}, | |
'original_query': {'type': 'null'}}, | |
'required': ['citation_format', | |
'metadata_list', | |
'original_query']}, | |
'args': {'type': 'array', | |
'items': {'anyOf': [{'type': ['integer', 'string']}, | |
{'type': 'array', 'items': {'type': 'integer'}}]}}, | |
'system_hints': {'type': 'array', 'items': {'type': 'string'}}, | |
'cloud_doc_urls': {'type': 'array', 'items': {'type': 'null'}}, | |
'search_engine': {'type': 'string'}, | |
'aggregate_result': {'type': 'object', | |
'properties': {'status': {'type': 'string'}, | |
'run_id': {'type': 'string'}, | |
'start_time': {'type': 'number'}, | |
'update_time': {'type': 'number'}, | |
'code': {'type': 'string'}, | |
'end_time': {'type': ['null', 'number']}, | |
'final_expression_output': {'type': ['null', 'string']}, | |
'in_kernel_exception': {'anyOf': [{'type': 'null'}, | |
{'type': 'object', | |
'properties': {'name': {'type': 'string'}, | |
'traceback': {'type': 'array', 'items': {'type': 'string'}}, | |
'args': {'type': 'array', 'items': {'type': 'string'}}, | |
'notes': {'type': 'array'}}, | |
'required': ['args', 'name', 'notes', 'traceback']}]}, | |
'system_exception': {'type': 'null'}, | |
'messages': {'type': 'array', | |
'items': {'type': 'object', | |
'properties': {'message_type': {'type': 'string'}, | |
'time': {'type': 'number'}, | |
'sender': {'type': 'string'}, | |
'image_payload': {'type': 'null'}, | |
'image_url': {'type': 'string'}, | |
'width': {'type': 'integer'}, | |
'height': {'type': 'integer'}, | |
'stream_name': {'type': 'string'}, | |
'text': {'type': 'string'}, | |
'timeout_triggered': {'type': 'number'}}, | |
'required': ['message_type', 'sender', 'time']}}, | |
'jupyter_messages': {'type': 'array', | |
'items': {'type': 'object', | |
'properties': {'msg_type': {'type': 'string'}, | |
'parent_header': {'type': 'object', | |
'properties': {'msg_id': {'type': 'string'}, | |
'version': {'type': 'string'}}, | |
'required': ['msg_id', 'version']}, | |
'content': {'type': 'object', | |
'properties': {'execution_state': {'type': 'string'}, | |
'data': {'type': 'object', | |
'properties': {'text/plain': {'type': 'string'}, | |
'text/html': {'type': 'string'}, | |
'image/vnd.openai.fileservice2.png': {'type': 'string'}, | |
'image/vnd.openai.fileservice.png': {'type': 'string'}}, | |
'required': ['text/plain']}, | |
'name': {'type': 'string'}, | |
'text': {'type': 'string'}, | |
'traceback': {'type': 'array', | |
'items': {'type': 'string'}}, | |
'ename': {'type': 'string'}, | |
'evalue': {'type': 'string'}}}, | |
'timeout': {'type': 'number'}}, | |
'required': ['msg_type']}}, | |
'timeout_triggered': {'type': ['null', 'number']}}, | |
'required': ['code', | |
'end_time', | |
'final_expression_output', | |
'in_kernel_exception', | |
'jupyter_messages', | |
'messages', | |
'run_id', | |
'start_time', | |
'status', | |
'system_exception', | |
'timeout_triggered', | |
'update_time']}, | |
'paragen_variants_info': {'type': 'object', | |
'properties': {'type': {'type': 'string'}, | |
'num_variants_in_stream': {'type': 'integer'}, | |
'display_treatment': {'type': 'string'}, | |
'conversation_id': {'type': 'string'}}, | |
'required': ['conversation_id', | |
'display_treatment', | |
'num_variants_in_stream', | |
'type']}, | |
'paragen_variant_choice': {'type': 'string'}, | |
'voice_mode_message': {'type': 'boolean'}, | |
'kwargs': {'type': 'object', | |
'properties': {'message_id': {'type': 'string'}, | |
'pending_message_id': {'type': ['null', 'string']}, | |
'sync_write': {'type': 'boolean'}}, | |
'required': ['message_id']}, | |
'augmented_paragen_prompt_label': {'type': ['null', 'string']}, | |
'exclusive_key': {'type': 'string'}, | |
'model_switcher_deny': {'type': 'array', | |
'items': {'type': 'object', | |
'properties': {'slug': {'type': 'string'}, | |
'context': {'type': 'string'}, | |
'reason': {'type': 'string'}, | |
'description': {'type': 'string'}}, | |
'required': ['context', 'description', 'reason', 'slug']}}, | |
'pad': {'type': 'string'}, | |
'real_time_audio_has_video': {'type': 'boolean'}, | |
'ada_visualizations': {'type': 'array', | |
'items': {'type': 'object', | |
'properties': {'type': {'type': 'string'}, | |
'file_id': {'type': 'string'}, | |
'title': {'type': 'string'}, | |
'chart_type': {'type': 'string'}, | |
'fallback_to_image': {'type': 'boolean'}}, | |
'required': ['chart_type', | |
'fallback_to_image', | |
'file_id', | |
'title', | |
'type']}}, | |
'requested_model_slug': {'type': 'string'}, | |
'dalle': {'type': 'object', | |
'properties': {'from_client': {'type': 'object', | |
'properties': {'operation': {'type': 'object', | |
'properties': {'type': {'type': 'string'}, | |
'original_gen_id': {'type': 'string'}, | |
'original_file_id': {'type': 'string'}}, | |
'required': ['original_file_id', | |
'original_gen_id', | |
'type']}}, | |
'required': ['operation']}}, | |
'required': ['from_client']}, | |
'filter_out_for_training': {'type': 'boolean'}, | |
'jit_plugin_data': {'type': 'object', | |
'properties': {'from_server': {'type': 'object', | |
'properties': {'type': {'type': 'string'}, | |
'body': {'type': 'object', | |
'properties': {'domain': {'type': 'string'}, | |
'is_consequential': {'type': 'boolean'}, | |
'privacy_policy': {'type': 'string'}, | |
'method': {'type': 'string'}, | |
'path': {'type': 'string'}, | |
'operation': {'type': 'string'}, | |
'params': {'type': 'object', | |
'properties': {'country_name': {'type': 'string'}, | |
'state_name': {'type': 'string'}, | |
'city_name': {'type': 'string'}, | |
'filters': {'type': 'string'}, | |
'num_trails': {'type': 'integer'}, | |
'raw_query': {'type': 'string'}, | |
'location_helper': {'type': 'string'}}, | |
'required': ['city_name', | |
'country_name', | |
'filters', | |
'location_helper', | |
'num_trails', | |
'raw_query', | |
'state_name']}, | |
'actions': {'type': 'array', | |
'items': {'type': 'object', | |
'properties': {'name': {'type': 'string'}, | |
'type': {'type': 'string'}, | |
'allow': {'type': 'object', | |
'properties': {'target_message_id': {'type': 'string'}}, | |
'required': ['target_message_id']}, | |
'always_allow': {'type': 'object', | |
'properties': {'target_message_id': {'type': 'string'}, | |
'operation_hash': {'type': 'string'}}, | |
'required': ['operation_hash', 'target_message_id']}, | |
'deny': {'type': 'object', | |
'properties': {'target_message_id': {'type': 'string'}}, | |
'required': ['target_message_id']}}, | |
'required': ['type']}}}, | |
'required': ['actions', | |
'domain', | |
'is_consequential', | |
'method', | |
'operation', | |
'params', | |
'path', | |
'privacy_policy']}}, | |
'required': ['body', 'type']}, | |
'from_client': {'type': 'object', | |
'properties': {'user_action': {'type': 'object', | |
'properties': {'data': {'type': 'object', | |
'properties': {'type': {'type': 'string'}}, | |
'required': ['type']}, | |
'target_message_id': {'type': 'string'}}, | |
'required': ['data', 'target_message_id']}}, | |
'required': ['user_action']}}}, | |
'invoked_plugin': {'type': 'object', | |
'properties': {'type': {'type': 'string'}, | |
'namespace': {'type': 'string'}, | |
'plugin_id': {'type': 'string'}, | |
'http_response_status': {'type': 'integer'}}, | |
'required': ['http_response_status', | |
'namespace', | |
'plugin_id', | |
'type']}}}, | |
'recipient': {'type': 'string'}, | |
'channel': {'type': ['null', 'string']}}, | |
'required': ['author', | |
'channel', | |
'content', | |
'create_time', | |
'end_turn', | |
'id', | |
'metadata', | |
'recipient', | |
'status', | |
'update_time', | |
'weight']}]}, | |
'parent': {'type': ['null', 'string']}, | |
'children': {'type': 'array', 'items': {'type': 'string'}}}, | |
'required': ['children', 'id', 'message', 'parent']}, | |
'^client-created-': {'type': 'object', | |
'properties': {'id': {'type': 'string'}, | |
'message': {'type': 'null'}, | |
'parent': {'type': 'null'}, | |
'children': {'type': 'array', 'items': {'type': 'string'}}}, | |
'required': ['children', 'id', 'message', 'parent']}}}, | |
'title': {'type': 'string'}, | |
'create_time': {'type': 'number'}, | |
'update_time': {'type': 'number'}, | |
'moderation_results': {'type': 'array'}, | |
'current_node': {'type': 'string'}, | |
'plugin_ids': {'anyOf': [{'type': 'null'}, | |
{'type': 'array', 'items': {'type': 'string'}}]}, | |
'conversation_id': {'type': 'string'}, | |
'conversation_template_id': {'type': ['null', 'string']}, | |
'gizmo_id': {'type': ['null', 'string']}, | |
'gizmo_type': {'type': ['null', 'string']}, | |
'is_archived': {'type': 'boolean'}, | |
'is_starred': {'type': 'null'}, | |
'safe_urls': {'type': 'array', 'items': {'type': 'string'}}, | |
'blocked_urls': {'type': 'array'}, | |
'default_model_slug': {'type': ['null', 'string']}, | |
'conversation_origin': {'type': 'null'}, | |
'voice': {'type': ['null', 'string']}, | |
'async_status': {'type': ['integer', 'null']}, | |
'disabled_tool_ids': {'type': 'array'}, | |
'is_do_not_remember': {'type': ['boolean', 'null']}, | |
'memory_scope': {'type': 'string'}, | |
'id': {'type': 'string'}}, | |
'required': ['async_status', | |
'blocked_urls', | |
'conversation_id', | |
'conversation_origin', | |
'conversation_template_id', | |
'create_time', | |
'current_node', | |
'default_model_slug', | |
'disabled_tool_ids', | |
'gizmo_id', | |
'gizmo_type', | |
'id', | |
'is_archived', | |
'is_do_not_remember', | |
'is_starred', | |
'mapping', | |
'memory_scope', | |
'moderation_results', | |
'plugin_ids', | |
'safe_urls', | |
'title', | |
'update_time', | |
'voice']}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import os | |
from pathlib import Path | |
import sys | |
from genson import SchemaBuilder | |
seed_schema = { | |
'type': 'array', | |
'items': { | |
'type': 'object', | |
'properties': { | |
'mapping': { | |
'type': 'object', | |
'patternProperties': { | |
# UUID pattern - GenSON will fill in the actual schema | |
r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$': None, | |
# Also handle the client-created-root pattern | |
r'^client-created-': None | |
} | |
} | |
} | |
} | |
} | |
builder = SchemaBuilder() | |
builder.add_schema(seed_schema) | |
root = Path("path/to/conversations.json") | |
convs = json.load(fpath.open()) | |
builder.add_object(convs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment