{"id":18473424,"url":"https://github.com/0xopenbytes/chatservice","last_synced_at":"2025-07-09T04:06:35.274Z","repository":{"id":132778697,"uuid":"611976928","full_name":"0xOpenBytes/ChatService","owner":"0xOpenBytes","description":"🤖 Chat with GPT","archived":false,"fork":false,"pushed_at":"2023-03-10T00:29:23.000Z","size":9,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-16T02:58:33.972Z","etag":null,"topics":["async","async-await","chat","chatgpt","gpt","ios","macos","network","openai","swift","swiftui","tvos","watchos"],"latest_commit_sha":null,"homepage":"https://0xopenbytes.github.io/ChatService/","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/0xOpenBytes.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-09T23:50:40.000Z","updated_at":"2024-11-12T17:50:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"93e1b055-42f6-4be8-ad5d-d6325ef0d2fb","html_url":"https://github.com/0xOpenBytes/ChatService","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/0xOpenBytes/ChatService","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xOpenBytes%2FChatService","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xOpenBytes%2FChatService/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xOpenBytes%2FChatService/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xOpenBytes%2FChatService/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xOpenBytes","download_url":"https://codeload.github.com/0xOpenBytes/ChatService/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xOpenBytes%2FChatService/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264390710,"owners_count":23600563,"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":["async","async-await","chat","chatgpt","gpt","ios","macos","network","openai","swift","swiftui","tvos","watchos"],"created_at":"2024-11-06T10:24:54.446Z","updated_at":"2025-07-09T04:06:35.256Z","avatar_url":"https://github.com/0xOpenBytes.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ChatService\n\n*🤖 Chat with GPT*\n\nChatService is a Swift package that provides a simple API for chatting with an AI-powered bot based on GPT (Generative Pretrained Transformer) architecture. The package uses OpenAI's GPT models to generate responses to user inputs.\n\n**[OpenAI API Reference](https://platform.openai.com/docs/api-reference/chat)**\n\n\n## Usage\n\nTo use ChatService in your app, first import the module:\n\n```swift\nimport ChatService\n```\n\nThen, create an instance of ChatService with your OpenAI API key:\n\n```swift\nlet chatService = ChatService(key: \"YOUR_OPENAI_API_KEY\")\n```\n\nYou can then use the completion method to generate a response to a user message:\n\n```swift\nlet response: String = try await chatService.completion(for: \"Hello?\")\n```\n\nYou can access the chat history using the chatHistory property of the ChatService object:\n\n```swift\nlet chatHistory: [ChatService.Chat] = chat.chatHistory\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xopenbytes%2Fchatservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xopenbytes%2Fchatservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xopenbytes%2Fchatservice/lists"}