{"id":26271290,"url":"https://github.com/lhuanyu/gptmessage","last_synced_at":"2025-05-01T13:21:09.147Z","repository":{"id":175515654,"uuid":"619867295","full_name":"lhuanyu/GPTMessage","owner":"lhuanyu","description":"A SwiftUI app demonstrating how ChatGPT interacts with DALL·E and HuggingFace models for iOS and macOS.","archived":false,"fork":false,"pushed_at":"2025-02-21T10:55:13.000Z","size":11349,"stargazers_count":53,"open_issues_count":0,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T21:22:56.170Z","etag":null,"topics":["aigc","chatgpt","chatgpt-app","dall-e","huggingface","imagecaption","imagegeneration","imagetotext","ios","macos","openai","openai-api","stable-diffusion","swift","swiftui","texttoimage"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/lhuanyu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-03-27T15:13:47.000Z","updated_at":"2025-03-15T11:39:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"bcdec48d-2581-4542-92c4-eded45ba2d64","html_url":"https://github.com/lhuanyu/GPTMessage","commit_stats":null,"previous_names":["lhuanyu/gptmessage"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lhuanyu%2FGPTMessage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lhuanyu%2FGPTMessage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lhuanyu%2FGPTMessage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lhuanyu%2FGPTMessage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lhuanyu","download_url":"https://codeload.github.com/lhuanyu/GPTMessage/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251879562,"owners_count":21658771,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["aigc","chatgpt","chatgpt-app","dall-e","huggingface","imagecaption","imagegeneration","imagetotext","ios","macos","openai","openai-api","stable-diffusion","swift","swiftui","texttoimage"],"created_at":"2025-03-14T06:19:15.715Z","updated_at":"2025-05-01T13:21:09.097Z","avatar_url":"https://github.com/lhuanyu.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GPTMessage\nA SwiftUI app demonstrating how ChatGPT interacts with DALL·E and HuggingFace models for iOS and macOS.\n\nThis is what the app looks like on iOS:\n\u003cp float=\"left\"\u003e\n  \u003cimg src=\"screenshot.jpg\" width=\"400\" /\u003e\n  \u003cimg src=\"screenshot1.jpg\" width=\"400\" /\u003e \n\u003c/p\u003e\n\nAnd macOS:\n\u003cp float=\"left\"\u003e\n  \u003cimg src=\"screenshot_macOS.jpg\" width=\"800\"/\u003e\n\u003c/p\u003e\n\n## Feautures\n### Chat Completion\n\nChat Completion is driven by OpenAI's chat language models, including gpt-3.5-turbo and gpt-3.5-turbo-0301.\n### Image Generation\n\nImage Generation uses OpenAI's image generation API(DALL·E) and HuggingFace's Inference API to create images.\n\nTo start drawing, simply send a message beginning with \"Draw\". For example, you could say `Draw a close-up, studio photographic portrait of a curious-looking blue British Shorthair cat`.\n\n`Draw something` is a hardcoded prompt. However, when Smart Mode is enabled, ChatGPT will classify your prompt and select the most appropriate model to handle it. Therefore, you could ask, `Can you assist me in creating a close-up, studio photographic portrait of a curious-looking blue British Shorthair cat?`.\n\nOpenAI's DALL·E is the preferred option since it's stable and fast(but expensive). You can easily switch to Hugging Face's Inference API(like [stable-diffusion-v1-5](https://huggingface.co/runwayml/stable-diffusion-v1-5) or [stabilityai/stable-diffusion-2-1](https://huggingface.co/stabilityai/stable-diffusion-2-1)) in the settings.\n\n### Image Caption\n\nBy connecting ChatGPT with an Image Caption model such as [nlpconnect/vit-gpt2-image-captioning](https://huggingface.co/nlpconnect/vit-gpt2-image-captioning) from Hugging Face, we can easily integrate the image captioning task with the image generation task.\n\n\u003cp float=\"left\"\u003e\n  \u003cimg src=\"screenshot_macOS_image_caption.jpg\" width=\"800\"/\u003e\n\u003c/p\u003e\n\n\u003cp float=\"left\"\u003e\n  \u003cimg src=\"screenshot_image_caption.jpg\" width=\"400\" /\u003e\n  \u003cimg src=\"screenshot_image_caption1.jpg\" width=\"400\" /\u003e\n\u003c/p\u003e\n\n## Prompts\n\nDefault prompts come from **[Awesome ChatGPT Prompts](https://github.com/f/awesome-chatgpt-prompts)**.\n\n### iOS\n\nClick the person icon or type '/' to show the prompts list.\n\n### macOS\n\nType '/' to show the prompts list.\n\n## Usage\n\nSet your OpenAI API key in the `AppConfiguration`.\n\n```swift\nclass AppConfiguration: ObservableObject {\n        \n    @AppStorage(\"configuration.key\") var key = \"OpenAI API Key\"\n    \n}\n```\n\nSet your Hugging Face User Access Token in the `HuggingFaceConfiguration`.\n\n```swift\nclass HuggingFaceConfiguration: ObservableObject {\n        \n    @AppStorage(\"huggingFace.key\") var key: String = \"\"\n    \n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flhuanyu%2Fgptmessage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flhuanyu%2Fgptmessage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flhuanyu%2Fgptmessage/lists"}