prompty icon indicating copy to clipboard operation
prompty copied to clipboard

Add async calls to (Azure) OpenAI

Open ianchi opened this issue 1 year ago • 3 comments

Current Invoke does not allow for async calls to OpenAI api.

This is a blocker for adoption where non blocking use is needed (or unelegant hacks needs to be added on top).

The proposal is to add an ainvoke interfase, that works with the same inputs and resolves to the same outputs.

ianchi avatar Oct 08 '24 21:10 ianchi

Good call - I need to do that.

sethjuarez avatar Oct 09 '24 20:10 sethjuarez

Hi @sethjuarez, I see that it is already implemented in promptflow.core

In fact all Prompty implementation is more complete there. (Escaping, handling of tools in parser, streaming, token count)

Is there a plan to unify the base parsing?

ianchi avatar Oct 12 '24 01:10 ianchi

Tool handling, streaming, and token count already work in prompty (if it reports tokens of course). I do agree that I need to add async invokers. Give me a couple of days to get it in (some folks are also working on json_schema enhancements).

sethjuarez avatar Oct 12 '24 06:10 sethjuarez