Skip to content

leovandriel/patch-openai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Patch OpenAI

Insert caching and logging directly into the OpenAI package source.

Usage

Patch the source:

python -m patch

This will:

  • Find the request method and insert a request_without_cache method and a request_with_cache replacement.
  • Cache all invocations int /cache folder, unless stream=True.
  • Cache all request and response data, including API key.

Undo changes:

python -m restore

This will restore a backup of the original source file.

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages