semantic-kernel icon indicating copy to clipboard operation
semantic-kernel copied to clipboard

ChatGPT API Python Support

Open jjhenkel opened this issue 2 years ago • 3 comments

Motivation and Context

This PR provides a path to using the ChatGPT API in the Python Preview of Semantic Kernel. In addition, this provides Azure* versions of many existing models (so Python users can leverage Azure OpenAI).

I think that, in general, it may be worth considering how best to work with models that have different modalities: now we have text completions, embeddings, chat completions (and I'd imagine images/etc. may be nice to support someday too).

Regardless, this PR provides a fast path to using the exciting new Chat APIs from OpenAI with SK!

See the new python/tests/chat_gpt_api.py for a usage example.

jjhenkel avatar Mar 20 '23 15:03 jjhenkel

Thanks for the review, I would suggest addressing the easy comments now before merging

dluc avatar Mar 24 '23 01:03 dluc

FYI: there's one file conflict to address

dluc avatar Mar 24 '23 01:03 dluc

Okay, branch surgery done, feedback addressed, and I threw in a linter/formatter pass at the end as some of the files got out of sync with our formatting rules.

@dluc I think we're ready to merge this now!

jjhenkel avatar Mar 24 '23 14:03 jjhenkel