Skip to content
C

ChatGPTSwift

Access ChatGPT API using Swift

by alfianlosariFree

#2529in AI
0In stores

Description

ChatGPTSwift is a Swift package for calling the official OpenAI ChatGPT API from Apple platforms. It supports iOS and tvOS 15 and later, mac…

Highlights

  • Swift client for the OpenAI ChatGPT API
  • Streaming and normal request styles
  • Works on iOS, macOS, watchOS, tvOS and Linux
  • Conversation history with token trimming
  • Installs with Swift Package Manager or CocoaPods

Ratings & Reviews

No ratings yet

Be the first to rate ChatGPTSwift.

People also visit

C

ChatGPT-Siri

Shortcuts for Siri using ChatGPT API, supports continuous conversations

AI
Launch
S

SwiftyChat

A lightweight SwiftUI chat UI framework

AI
Launch
C

Chatgpt

ChatGPT Console client in Golang

AI
Launch
C

ChatGPT

A ChatGPT C# client for MacOS, Windows, Linux, Android, iOS and Browser

AI
Launch
F

FridayGPT

Fast and Native ChatGPT mac app

AI
Launch
A

AICat

Multiplatform Client for ChatGPT using SwiftUI, support iOS, iPadOS & MacOS

AI
Launch

ChatGPTSwift FAQ

What is ChatGPTSwift?

It is a Swift package that wraps the official OpenAI ChatGPT API so you can call it from Apple platforms and Linux.

Which platforms are supported?

The README lists iOS and tvOS 15 and above, macOS 12 and above, watchOS 8 and above, and Linux.

How do I install it?

Add the package URL in Swift Package Manager, or use CocoaPods. You also need an API key from OpenAI.

How does the conversation history work?

The client includes earlier messages in each new prompt. Before sending, it counts tokens with GPTEncoder and drops older messages when the count goes over 4096.

What are the best ChatGPTSwift alternatives?

Popular alternatives to ChatGPTSwift include ChatGPT-Siri, SwiftyChat and Chatgpt. See all ChatGPTSwift alternatives

Developer Stuff

Badges