-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Python] Openai Wrapper improvements
## What 1. Save outputs 2. Allow passing a file path 3. Allow passing an AIConfig object 4. Persist output with streaming enabled (pass through streaming) Notes: - With streaming, we can either capture the response and not return it to the user or use pass through streaming, but, if the stream completion is not fully iterated through, ie the user doesn't touch the completion, completion args doesn't get serialized. Can't do both due to the nature of what it entails - - chose to go with pass through streaming - If the completion has a prompt that is already in the config (same input, settings, etc) but different outputs, the outputs are overriden with the new one - if one completion is streamed, and another is not, those are considered different prompts and get serialized as such ## Why Wrapper needs to be customizable and flexible
- Loading branch information
1 parent
d6a2314
commit 6806c16
Showing
1 changed file
with
152 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters