Comments (2)
This works for me. I'm using the build at commit hash: 72f1d89
func requestDallEImageWithString(_ message: String) {
let openAI = OpenAISwift(authToken: viewModel.apiToken)
openAI.sendImages(with: message, numImages: 1, size: .size1024) { result in // Result<OpenAI, OpenAIError>
switch result {
case .success(let success):
if let imageResponseArray = success.data {
let responseUrlString = imageResponseArray.first?.url ?? ""
// do what you want with the url string
}
case .failure(let failure):
print(failure.localizedDescription)
}
}
}
from openaiswift.
Yeah, created a new release tag 1.3.0 - please update to use this version 👍🏼
from openaiswift.
Related Issues (20)
- sendChat is failing because ChatMessage has extra property HOT 12
- OpenAI Token is not accepted HOT 3
- sendChat model .gpt4(.gpt4) throws Error HOT 11
- .gpt4 is not working, returning empty string HOT 1
- your code is broken. HOT 2
- authToken doesn't work in version 1.4 HOT 6
- "The operation couldn’t be completed. (OpenAISwift.OpenAIError error 2.)" HOT 2
- Always returning nil HOT 3
- OpenAIEndpointModelType that replaces the OpenAIModelType so only compatible models are available for each method
- Dev for custom base url
- Ability to enter an API Key HOT 2
- Archiving error HOT 5
- Update Release Version HOT 3
- Whisper support?
- issue: not getting full response back HOT 1
- sendChat issue? HOT 1
- The operation couldn’t be completed. (OpenAISwift.OpenAIError error 2.) HOT 3
- Is gpt-3.5-turbo-16k model possible? HOT 2
- Update Usage Information HOT 1
- sendChat Error OpenAI does not like message HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openaiswift.