Fix: Update prompt caching to use standard API endpoint#178
Conversation
|
Hi @jun229, thanks for contributing! You will also need to remove the |
|
hi @jun229 thanks for the PR. Looks like there are some conflicts before I can merge this one. |
|
Hi @PedramNavid, all merge conflicts have been resolved, and the deprecated The PR should now be ready for review. Thanks again for your time! |
|
Orb Code Review (powered by GLM 5.1 on Orb Cloud) Straightforward removal of the deprecated AnalysisPrompt caching is now generally available, so the beta header is no longer needed. The removal is done in both places where the header was used, and the surrounding code structure is preserved correctly. SummaryClean removal of a deprecated beta header. No issues. Assessment: approve |
Problem
The prompt caching example in [contextual-embeddings/guide.ipynb] uses deprecated API syntax that causes errors:
Solution
Updated to use the current standard API endpoint for prompt caching:
Changes Made
client.beta.prompt_caching.messages.create()withclient.messages.create()extra_headersfor prompt caching functionality