diff --git a/aiconfig-docs/docs/introduction/getting-started.md b/aiconfig-docs/docs/introduction/getting-started.md index 6b413929d..ae140151b 100644 --- a/aiconfig-docs/docs/introduction/getting-started.md +++ b/aiconfig-docs/docs/introduction/getting-started.md @@ -324,5 +324,28 @@ We are working on a local editor that you can run yourself. For now, please use ``` +""" +wrapper around openai.ChatCompletion.create that will serialize prompts and save them to config +usage: + + Normal Import: + ` import openai` + + Modified: + ``` + import openai + + from aiconfig.ChatCompletion import create_and_save_to_config + openai.ChatCompletion.create = create_and_save_to_config + ``` +""" + +import openai + +from aiconfig.ChatCompletion import create_and_save_to_config +openai.ChatCompletion.create = create_and_save_to_config + +# now you can use openai normally +openai.ChatCompletion.create(...) ```