Repository navigation
Add X-Pplx-Integration header to Perplexity sample client - #343
Open
Saleh Alghusson (qirh) wants to merge 6 commits into
Open
Saleh Alghusson (qirh) wants to merge 6 commits into
Saleh Alghusson (qirh) wants to merge 6 commits into
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an
X-Pplx-Integration: agent365-samplesdefault header to the Node.js Perplexity sample's SDK client so Perplexity can recognize API traffic coming from this sample.api.perplexity.ai. IfPERPLEXITY_BASE_URLpoints to a proxy or other host, the client is unchanged.Verification:
npm installandnpx tsc -p .innodejs/perplexity/sample-agentsucceed.fetchagainst the built client: header sent once for the default and explicithttps://api.perplexity.aibase URLs; not sent for a custom proxy host or a lookalike host (api.perplexity.ai.evil.com);Authorizationunchanged in all cases (12/12 checks).