OthersideAI / self-operating-computer

A framework to enable multimodal models to operate a computer.
https://www.hyperwriteai.com/self-operating-computer
MIT License
8.21k stars 1.09k forks source link

[FEATURE] Change OpenAI client to Async #160

Open mjspeck opened 5 months ago

mjspeck commented 5 months ago

Is your feature request related to a problem? Please describe.

The calls to Open AI are wrapped in an async function, but the OpenAI client is still the synchronous client, meaning the code is still blocking and there's no benefit to running it as async.

Describe the solution you'd like

Change the client to the openai.AsyncOpenAI object.

Ideally, there would be sync and async options, but since the code is wrapped in an async function, for now we might as well just also force the client to be async.