Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v6
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6

- name: Setup pnpm
uses: pnpm/action-setup@v4
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
with:
version: 10.8.0

- name: Setup Node.js
uses: actions/setup-node@v6
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: '20'
cache: 'pnpm'
Expand All @@ -34,4 +34,3 @@ jobs:
env:
PERPLEXITY_API_KEY: test-api-key
run: pnpm test

2 changes: 2 additions & 0 deletions src/tools/perplexity-search.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { tool } from "ai";
import { z } from "zod";
import packageJson from "../../package.json";
import type { PerplexitySearchConfig, PerplexitySearchResponse } from "../types";

export function perplexitySearch(config: PerplexitySearchConfig = {}) {
Expand Down Expand Up @@ -77,6 +78,7 @@ export function perplexitySearch(config: PerplexitySearchConfig = {}) {
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${apiKey}`,
'X-Pplx-Integration': `perplexity-ai-sdk/${packageJson.version}`,
},
body: JSON.stringify(requestBody),
});
Expand Down
Loading