jamesrochabrun / SwiftOpenAI

An open-source Swift package for interacting with OpenAI's public API.
MIT License
355 stars 54 forks source link

Speed #38

Closed cdahllof closed 5 months ago

cdahllof commented 5 months ago

Hi James,

Thanks for creating an repo that is up to date with OpenAI API. It made it easy to create a voice assistant.

I am working on speeding up the app and wondering if you have any suggestions.

Thanks!

caro

jamesrochabrun commented 5 months ago

What do you mean exaclty? is a personal app? What do you want to optimize?

cdahllof commented 5 months ago

I have created a personal app. It is very simple, I have an AI assistant that you can speak to and it replies. It takes many seconds to get a response. What is a normal response time?

jamesrochabrun commented 5 months ago

The delay is understandable as you may be using speech to text first, then making a request to completion API, wait for the response and then making a new request to text to speech. There is no much you can do now, but good news are that soon you will be able to do all using gtp 4 O model which it will make this process faster. Good luck!

cdahllof commented 5 months ago

Thanks James.