Skip to content

Commit

Permalink
[docs] openai ChatCompletion Wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
Ankush Pala [email protected] committed Nov 10, 2023
1 parent 6806c16 commit 4ecbfd5
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions aiconfig-docs/docs/introduction/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,5 +324,28 @@ We are working on a local editor that you can run yourself. For now, please use
<video controls><source src="https://s3.amazonaws.com/publicdata.lastmileai.com/workbook_editor_480.mov"/></video>

```
"""
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(...)
```

0 comments on commit 4ecbfd5

Please sign in to comment.