{"id":17603105,"url":"https://github.com/yjg30737/pyqt-openai-formatted-response-example","last_synced_at":"2026-05-09T06:35:35.059Z","repository":{"id":174922979,"uuid":"652992609","full_name":"yjg30737/pyqt-openai-formatted-response-example","owner":"yjg30737","description":"Implementing response of chatGPT(plain text and source) as desktop application with Python","archived":false,"fork":false,"pushed_at":"2023-06-14T01:18:50.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-18T11:52:20.936Z","etag":null,"topics":["chatgpt","chatgpt-python","openai","pyqt","pyqt-examples","pyqt5","pyqt5-desktop-application","python","python3","qt"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yjg30737.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-06-13T07:48:30.000Z","updated_at":"2023-06-16T09:43:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"eabde5c4-b390-4692-b13d-00cfdb13169f","html_url":"https://github.com/yjg30737/pyqt-openai-formatted-response-example","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"98723534e02361d7d5e27ddda5c8b905d2cc016d"},"previous_names":["yjg30737/pyqt-openai-formatted-response-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yjg30737/pyqt-openai-formatted-response-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yjg30737%2Fpyqt-openai-formatted-response-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yjg30737%2Fpyqt-openai-formatted-response-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yjg30737%2Fpyqt-openai-formatted-response-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yjg30737%2Fpyqt-openai-formatted-response-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yjg30737","download_url":"https://codeload.github.com/yjg30737/pyqt-openai-formatted-response-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yjg30737%2Fpyqt-openai-formatted-response-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32809886,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatgpt","chatgpt-python","openai","pyqt","pyqt-examples","pyqt5","pyqt5-desktop-application","python","python3","qt"],"created_at":"2024-10-22T13:39:50.754Z","updated_at":"2026-05-09T06:35:35.041Z","avatar_url":"https://github.com/yjg30737.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyqt-openai-formatted-response-example\n\nImplementing response of ChatGPT(plain text and source) as desktop application with Python (PyQt)\n\nThis simple app demonstrates how to create a John-like response using PyQt, which includes both plain text and source code.\n\nFor instance, consider the following response:\n\n`````\nTo print \"Hello, World!\" 10 times in Python, you can use a loop. Here's an example:\n\n```\nfor _ in range(10):\n    print(\"Hello, World!\")\n```\n\nIn this code snippet, the `for` loop iterates 10 times. During each iteration, it executes the `print(\"Hello, World!\")` statement, which will output \"Hello, World!\" to the console.\n``````\n\nThis app utilizes a `QLabel` widget for the plain text portion and a `QTextBrowser` widget for the source code section. menu which includes a copy button is attached to the source code section.\n\ncheck out \u003ca href=\"https://github.com/yjg30737/pyqt-openai\"\u003epyqt-openai\u003c/a\u003e as well :)\n\n## Requirements\n* PyQt5 \u003e= 5.14\n* pyperclip - for \"copy\" feature\n* pygments - to highlight the source\n\n## How to Run\n1. git clone ~\n2. cd pyqt-openai-formatted-response-example\n3. pip install -r requirements.txt\n4. cd pyqt_openai_formatted_response_example\n5. go to the main.py and give the text you want to give. If you want to include the source in text, you have to wrap it with \"```\".\n```python\nif __name__ == \"__main__\":\n    import sys\n\n    app = QApplication(sys.argv)\n    w = LblWithQTextBrowser()\n    w.setText(\n    [YOUR TEXT] # change this part\n    )\n    w.show()\n    sys.exit(app.exec())\n```\n6. python main.py\n\n## Result\n![image](https://github.com/yjg30737/pyqt-openai-formatted-response-example/assets/55078043/89f440fb-2aa0-43f3-aaf9-8381c3fd8cec)\n\n## Note\nPlease remember that programming language detection by `guess_lexer` by pygments is not quite accurate.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyjg30737%2Fpyqt-openai-formatted-response-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyjg30737%2Fpyqt-openai-formatted-response-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyjg30737%2Fpyqt-openai-formatted-response-example/lists"}