@keystrokehq/openperplex 0.1.0 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action.cjs.map +1 -1
- package/dist/action.mjs.map +1 -1
- package/dist/actions/custom-search-stream.cjs +3 -3
- package/dist/actions/custom-search-stream.cjs.map +1 -1
- package/dist/actions/custom-search-stream.d.cts +43 -3
- package/dist/actions/custom-search-stream.d.cts.map +1 -1
- package/dist/actions/custom-search-stream.d.mts +43 -3
- package/dist/actions/custom-search-stream.d.mts.map +1 -1
- package/dist/actions/custom-search-stream.mjs +3 -3
- package/dist/actions/custom-search-stream.mjs.map +1 -1
- package/dist/actions/custom-search.cjs +3 -3
- package/dist/actions/custom-search.cjs.map +1 -1
- package/dist/actions/custom-search.d.cts +29 -3
- package/dist/actions/custom-search.d.cts.map +1 -1
- package/dist/actions/custom-search.d.mts +29 -3
- package/dist/actions/custom-search.d.mts.map +1 -1
- package/dist/actions/custom-search.mjs +3 -3
- package/dist/actions/custom-search.mjs.map +1 -1
- package/dist/actions/get-website-markdown.cjs +2 -2
- package/dist/actions/get-website-markdown.cjs.map +1 -1
- package/dist/actions/get-website-markdown.d.cts +15 -3
- package/dist/actions/get-website-markdown.d.cts.map +1 -1
- package/dist/actions/get-website-markdown.d.mts +15 -3
- package/dist/actions/get-website-markdown.d.mts.map +1 -1
- package/dist/actions/get-website-markdown.mjs +2 -2
- package/dist/actions/get-website-markdown.mjs.map +1 -1
- package/dist/actions/get-website-screenshot.cjs +3 -3
- package/dist/actions/get-website-screenshot.cjs.map +1 -1
- package/dist/actions/get-website-screenshot.d.cts +16 -3
- package/dist/actions/get-website-screenshot.d.cts.map +1 -1
- package/dist/actions/get-website-screenshot.d.mts +16 -3
- package/dist/actions/get-website-screenshot.d.mts.map +1 -1
- package/dist/actions/get-website-screenshot.mjs +3 -3
- package/dist/actions/get-website-screenshot.mjs.map +1 -1
- package/dist/actions/get-website-text.cjs +2 -2
- package/dist/actions/get-website-text.cjs.map +1 -1
- package/dist/actions/get-website-text.d.cts +20 -3
- package/dist/actions/get-website-text.d.cts.map +1 -1
- package/dist/actions/get-website-text.d.mts +20 -3
- package/dist/actions/get-website-text.d.mts.map +1 -1
- package/dist/actions/get-website-text.mjs +2 -2
- package/dist/actions/get-website-text.mjs.map +1 -1
- package/dist/actions/query-from-url.cjs +3 -3
- package/dist/actions/query-from-url.cjs.map +1 -1
- package/dist/actions/query-from-url.d.cts +22 -3
- package/dist/actions/query-from-url.d.cts.map +1 -1
- package/dist/actions/query-from-url.d.mts +22 -3
- package/dist/actions/query-from-url.d.mts.map +1 -1
- package/dist/actions/query-from-url.mjs +3 -3
- package/dist/actions/query-from-url.mjs.map +1 -1
- package/dist/actions/search-stream.cjs +3 -3
- package/dist/actions/search-stream.cjs.map +1 -1
- package/dist/actions/search-stream.d.cts +50 -3
- package/dist/actions/search-stream.d.cts.map +1 -1
- package/dist/actions/search-stream.d.mts +50 -3
- package/dist/actions/search-stream.d.mts.map +1 -1
- package/dist/actions/search-stream.mjs +3 -3
- package/dist/actions/search-stream.mjs.map +1 -1
- package/dist/actions/search.cjs +3 -3
- package/dist/actions/search.cjs.map +1 -1
- package/dist/actions/search.d.cts +51 -3
- package/dist/actions/search.d.cts.map +1 -1
- package/dist/actions/search.d.mts +51 -3
- package/dist/actions/search.d.mts.map +1 -1
- package/dist/actions/search.mjs +3 -3
- package/dist/actions/search.mjs.map +1 -1
- package/dist/catalog.cjs +7 -1
- package/dist/catalog.cjs.map +1 -1
- package/dist/catalog.d.cts +8 -0
- package/dist/catalog.d.mts +8 -0
- package/dist/catalog.mjs +7 -1
- package/dist/catalog.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.cjs","names":["z","action"],"sources":["../../src/actions/search.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OpenperplexSearchInput
|
|
1
|
+
{"version":3,"file":"search.cjs","names":["z","action"],"sources":["../../src/actions/search.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OpenperplexSearchInput = z.object({\n model: z.string().default(\"gpt-4o-mini\").describe(\"Model to use for generating responses. Options: 'o3-mini-high', 'o3-mini-medium', 'gpt-4o', 'gpt-4o-mini', 'gemini-2.0-flash'.\").optional(),\n query: z.string().describe(\"The search query or question you want to ask. This is the primary input for your search.\"),\n location: z.string().default(\"us\").describe(\"Country code for localized search results (e.g., 'us', 'jp', 'br', 'fr').\").optional(),\n answer_type: z.enum([\"text\", \"markdown\", \"html\"]).default(\"text\").describe(\"Format of the answer. Options: 'text', 'markdown', or 'html'.\").optional(),\n search_type: z.enum([\"general\", \"news\"]).default(\"general\").describe(\"Type of search to perform. Options: 'general' or 'news'.\").optional(),\n date_context: z.string().describe(\"Optional date for context. Format example: 'Today is Monday 16 of September 2024 and the time is 6:36 PM'. If not provided, the API uses the current date of the server.\").optional(),\n return_images: z.boolean().default(false).describe(\"Set to True to include images in the result.\").optional(),\n recency_filter: z.enum([\"hour\", \"day\", \"week\", \"month\", \"year\", \"anytime\"]).default(\"anytime\").describe(\"Filter results by recency. Options: 'hour', 'day', 'week', 'month', 'year', 'anytime'.\").optional(),\n return_sources: z.boolean().default(false).describe(\"Set to True to include sources in the result.\").optional(),\n return_citations: z.boolean().default(false).describe(\"Set to True to include citations in the response.\").optional(),\n response_language: z.string().default(\"auto\").describe(\"Language code for the response. Use 'auto' to auto-detect based on the query.\").optional(),\n}).describe(\"Parameters for performing a search query using the OpenPerplex API.\");\nconst OpenperplexSearch_SourceItemSchema = z.object({\n url: z.string().describe(\"URL of the source\").nullable().optional(),\n title: z.string().describe(\"Title of the source\").nullable().optional(),\n snippet: z.string().describe(\"Snippet from the source\").nullable().optional(),\n}).passthrough().describe(\"A source item in the search response.\");\nexport const OpenperplexSearchOutput = z.object({\n error: z.string().describe(\"Error message if any error occurred during the search.\").nullable().optional(),\n images: z.array(z.string()).describe(\"List of image URLs found in the search.\").nullable().optional(),\n sources: z.array(OpenperplexSearch_SourceItemSchema).describe(\"List of sources used to generate the response.\").nullable().optional(),\n llm_response: z.string().describe(\"The LLM-generated response based on the search results.\").nullable(),\n response_time: z.number().describe(\"The time taken to generate the response in seconds.\").nullable().optional(),\n}).passthrough().describe(\"Response model for a search operation from the OpenPerplex API.\");\n\nexport const openperplexSearch = action(\"OPENPERPLEX_SEARCH\", {\n slug: \"openperplex-search\",\n name: \"Search Documents\",\n description: \"Tool to search documents using query parameters. Use when you have a search query and optional filters ready.\",\n input: OpenperplexSearchInput,\n output: OpenperplexSearchOutput,\n});\n"],"mappings":";;;AAIA,MAAa,yBAAyBA,IAAAA,EAAE,OAAO;CAC7C,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,QAAQ,aAAa,CAAC,CAAC,SAAS,gIAAgI,CAAC,CAAC,SAAS;CAC7L,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0FAA0F;CACrH,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,SAAS,2EAA2E,CAAC,CAAC,SAAS;CAClI,aAAaA,IAAAA,EAAE,KAAK;EAAC;EAAQ;EAAY;CAAM,CAAC,CAAC,CAAC,QAAQ,MAAM,CAAC,CAAC,SAAS,+DAA+D,CAAC,CAAC,SAAS;CACrJ,aAAaA,IAAAA,EAAE,KAAK,CAAC,WAAW,MAAM,CAAC,CAAC,CAAC,QAAQ,SAAS,CAAC,CAAC,SAAS,0DAA0D,CAAC,CAAC,SAAS;CAC1I,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0KAA0K,CAAC,CAAC,SAAS;CACvN,eAAeA,IAAAA,EAAE,QAAQ,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS;CAC5G,gBAAgBA,IAAAA,EAAE,KAAK;EAAC;EAAQ;EAAO;EAAQ;EAAS;EA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,SAAS,yDAAyD,CAAC,CAAC,SAAS;CACtG,eAAeA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAChH,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,iEAAiE;AAE3F,MAAa,oBAAoBC,eAAAA,OAAO,sBAAsB;CAC5D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,9 +1,57 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/actions/search.d.ts
|
|
4
|
-
declare const OpenperplexSearchInput: z.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
declare const OpenperplexSearchInput: z.ZodObject<{
|
|
5
|
+
model: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
6
|
+
query: z.ZodString;
|
|
7
|
+
location: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
8
|
+
answer_type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
9
|
+
text: "text";
|
|
10
|
+
markdown: "markdown";
|
|
11
|
+
html: "html";
|
|
12
|
+
}>>>;
|
|
13
|
+
search_type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
14
|
+
general: "general";
|
|
15
|
+
news: "news";
|
|
16
|
+
}>>>;
|
|
17
|
+
date_context: z.ZodOptional<z.ZodString>;
|
|
18
|
+
return_images: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
19
|
+
recency_filter: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
20
|
+
hour: "hour";
|
|
21
|
+
day: "day";
|
|
22
|
+
week: "week";
|
|
23
|
+
month: "month";
|
|
24
|
+
year: "year";
|
|
25
|
+
anytime: "anytime";
|
|
26
|
+
}>>>;
|
|
27
|
+
return_sources: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
28
|
+
return_citations: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
29
|
+
response_language: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
declare const OpenperplexSearchOutput: z.ZodObject<{
|
|
32
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
33
|
+
images: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
34
|
+
sources: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
35
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
36
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
37
|
+
snippet: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
38
|
+
}, z.core.$loose>>>>;
|
|
39
|
+
llm_response: z.ZodNullable<z.ZodString>;
|
|
40
|
+
response_time: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
41
|
+
}, z.core.$loose>;
|
|
42
|
+
declare const openperplexSearch: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
43
|
+
query: string;
|
|
44
|
+
model?: string | undefined;
|
|
45
|
+
location?: string | undefined;
|
|
46
|
+
answer_type?: "text" | "markdown" | "html" | undefined;
|
|
47
|
+
search_type?: "general" | "news" | undefined;
|
|
48
|
+
date_context?: string | undefined;
|
|
49
|
+
return_images?: boolean | undefined;
|
|
50
|
+
recency_filter?: "hour" | "day" | "week" | "month" | "year" | "anytime" | undefined;
|
|
51
|
+
return_sources?: boolean | undefined;
|
|
52
|
+
return_citations?: boolean | undefined;
|
|
53
|
+
response_language?: string | undefined;
|
|
54
|
+
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
55
|
//#endregion
|
|
8
56
|
export { openperplexSearch };
|
|
9
57
|
//# sourceMappingURL=search.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.cts","names":[],"sources":["../../src/actions/search.ts"],"mappings":";;;cAIa,sBAAA,
|
|
1
|
+
{"version":3,"file":"search.d.cts","names":[],"sources":["../../src/actions/search.ts"],"mappings":";;;cAIa,sBAAA,EAAsB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkBtB,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;cAQvB,iBAAA,gCAAiB,wBAAA"}
|
|
@@ -1,9 +1,57 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/actions/search.d.ts
|
|
4
|
-
declare const OpenperplexSearchInput: z.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
declare const OpenperplexSearchInput: z.ZodObject<{
|
|
5
|
+
model: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
6
|
+
query: z.ZodString;
|
|
7
|
+
location: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
8
|
+
answer_type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
9
|
+
text: "text";
|
|
10
|
+
markdown: "markdown";
|
|
11
|
+
html: "html";
|
|
12
|
+
}>>>;
|
|
13
|
+
search_type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
14
|
+
general: "general";
|
|
15
|
+
news: "news";
|
|
16
|
+
}>>>;
|
|
17
|
+
date_context: z.ZodOptional<z.ZodString>;
|
|
18
|
+
return_images: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
19
|
+
recency_filter: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
20
|
+
hour: "hour";
|
|
21
|
+
day: "day";
|
|
22
|
+
week: "week";
|
|
23
|
+
month: "month";
|
|
24
|
+
year: "year";
|
|
25
|
+
anytime: "anytime";
|
|
26
|
+
}>>>;
|
|
27
|
+
return_sources: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
28
|
+
return_citations: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
29
|
+
response_language: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
declare const OpenperplexSearchOutput: z.ZodObject<{
|
|
32
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
33
|
+
images: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
34
|
+
sources: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
35
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
36
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
37
|
+
snippet: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
38
|
+
}, z.core.$loose>>>>;
|
|
39
|
+
llm_response: z.ZodNullable<z.ZodString>;
|
|
40
|
+
response_time: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
41
|
+
}, z.core.$loose>;
|
|
42
|
+
declare const openperplexSearch: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
43
|
+
query: string;
|
|
44
|
+
model?: string | undefined;
|
|
45
|
+
location?: string | undefined;
|
|
46
|
+
answer_type?: "text" | "markdown" | "html" | undefined;
|
|
47
|
+
search_type?: "general" | "news" | undefined;
|
|
48
|
+
date_context?: string | undefined;
|
|
49
|
+
return_images?: boolean | undefined;
|
|
50
|
+
recency_filter?: "hour" | "day" | "week" | "month" | "year" | "anytime" | undefined;
|
|
51
|
+
return_sources?: boolean | undefined;
|
|
52
|
+
return_citations?: boolean | undefined;
|
|
53
|
+
response_language?: string | undefined;
|
|
54
|
+
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
55
|
//#endregion
|
|
8
56
|
export { openperplexSearch };
|
|
9
57
|
//# sourceMappingURL=search.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.mts","names":[],"sources":["../../src/actions/search.ts"],"mappings":";;;cAIa,sBAAA,
|
|
1
|
+
{"version":3,"file":"search.d.mts","names":[],"sources":["../../src/actions/search.ts"],"mappings":";;;cAIa,sBAAA,EAAsB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkBtB,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;cAQvB,iBAAA,gCAAiB,wBAAA"}
|
package/dist/actions/search.mjs
CHANGED
|
@@ -29,7 +29,7 @@ const OpenperplexSearch_SourceItemSchema = z.object({
|
|
|
29
29
|
url: z.string().describe("URL of the source").nullable().optional(),
|
|
30
30
|
title: z.string().describe("Title of the source").nullable().optional(),
|
|
31
31
|
snippet: z.string().describe("Snippet from the source").nullable().optional()
|
|
32
|
-
}).describe("A source item in the search response.");
|
|
32
|
+
}).passthrough().describe("A source item in the search response.");
|
|
33
33
|
const openperplexSearch = action("OPENPERPLEX_SEARCH", {
|
|
34
34
|
slug: "openperplex-search",
|
|
35
35
|
name: "Search Documents",
|
|
@@ -39,9 +39,9 @@ const openperplexSearch = action("OPENPERPLEX_SEARCH", {
|
|
|
39
39
|
error: z.string().describe("Error message if any error occurred during the search.").nullable().optional(),
|
|
40
40
|
images: z.array(z.string()).describe("List of image URLs found in the search.").nullable().optional(),
|
|
41
41
|
sources: z.array(OpenperplexSearch_SourceItemSchema).describe("List of sources used to generate the response.").nullable().optional(),
|
|
42
|
-
llm_response: z.string().describe("The LLM-generated response based on the search results."),
|
|
42
|
+
llm_response: z.string().describe("The LLM-generated response based on the search results.").nullable(),
|
|
43
43
|
response_time: z.number().describe("The time taken to generate the response in seconds.").nullable().optional()
|
|
44
|
-
}).describe("Response model for a search operation from the OpenPerplex API.")
|
|
44
|
+
}).passthrough().describe("Response model for a search operation from the OpenPerplex API.")
|
|
45
45
|
});
|
|
46
46
|
//#endregion
|
|
47
47
|
export { openperplexSearch };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.mjs","names":[],"sources":["../../src/actions/search.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OpenperplexSearchInput
|
|
1
|
+
{"version":3,"file":"search.mjs","names":[],"sources":["../../src/actions/search.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OpenperplexSearchInput = z.object({\n model: z.string().default(\"gpt-4o-mini\").describe(\"Model to use for generating responses. Options: 'o3-mini-high', 'o3-mini-medium', 'gpt-4o', 'gpt-4o-mini', 'gemini-2.0-flash'.\").optional(),\n query: z.string().describe(\"The search query or question you want to ask. This is the primary input for your search.\"),\n location: z.string().default(\"us\").describe(\"Country code for localized search results (e.g., 'us', 'jp', 'br', 'fr').\").optional(),\n answer_type: z.enum([\"text\", \"markdown\", \"html\"]).default(\"text\").describe(\"Format of the answer. Options: 'text', 'markdown', or 'html'.\").optional(),\n search_type: z.enum([\"general\", \"news\"]).default(\"general\").describe(\"Type of search to perform. Options: 'general' or 'news'.\").optional(),\n date_context: z.string().describe(\"Optional date for context. Format example: 'Today is Monday 16 of September 2024 and the time is 6:36 PM'. If not provided, the API uses the current date of the server.\").optional(),\n return_images: z.boolean().default(false).describe(\"Set to True to include images in the result.\").optional(),\n recency_filter: z.enum([\"hour\", \"day\", \"week\", \"month\", \"year\", \"anytime\"]).default(\"anytime\").describe(\"Filter results by recency. Options: 'hour', 'day', 'week', 'month', 'year', 'anytime'.\").optional(),\n return_sources: z.boolean().default(false).describe(\"Set to True to include sources in the result.\").optional(),\n return_citations: z.boolean().default(false).describe(\"Set to True to include citations in the response.\").optional(),\n response_language: z.string().default(\"auto\").describe(\"Language code for the response. Use 'auto' to auto-detect based on the query.\").optional(),\n}).describe(\"Parameters for performing a search query using the OpenPerplex API.\");\nconst OpenperplexSearch_SourceItemSchema = z.object({\n url: z.string().describe(\"URL of the source\").nullable().optional(),\n title: z.string().describe(\"Title of the source\").nullable().optional(),\n snippet: z.string().describe(\"Snippet from the source\").nullable().optional(),\n}).passthrough().describe(\"A source item in the search response.\");\nexport const OpenperplexSearchOutput = z.object({\n error: z.string().describe(\"Error message if any error occurred during the search.\").nullable().optional(),\n images: z.array(z.string()).describe(\"List of image URLs found in the search.\").nullable().optional(),\n sources: z.array(OpenperplexSearch_SourceItemSchema).describe(\"List of sources used to generate the response.\").nullable().optional(),\n llm_response: z.string().describe(\"The LLM-generated response based on the search results.\").nullable(),\n response_time: z.number().describe(\"The time taken to generate the response in seconds.\").nullable().optional(),\n}).passthrough().describe(\"Response model for a search operation from the OpenPerplex API.\");\n\nexport const openperplexSearch = action(\"OPENPERPLEX_SEARCH\", {\n slug: \"openperplex-search\",\n name: \"Search Documents\",\n description: \"Tool to search documents using query parameters. Use when you have a search query and optional filters ready.\",\n input: OpenperplexSearchInput,\n output: OpenperplexSearchOutput,\n});\n"],"mappings":";;;AAIA,MAAa,yBAAyB,EAAE,OAAO;CAC7C,OAAO,EAAE,OAAO,CAAC,CAAC,QAAQ,aAAa,CAAC,CAAC,SAAS,gIAAgI,CAAC,CAAC,SAAS;CAC7L,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,0FAA0F;CACrH,UAAU,EAAE,OAAO,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,SAAS,2EAA2E,CAAC,CAAC,SAAS;CAClI,aAAa,EAAE,KAAK;EAAC;EAAQ;EAAY;CAAM,CAAC,CAAC,CAAC,QAAQ,MAAM,CAAC,CAAC,SAAS,+DAA+D,CAAC,CAAC,SAAS;CACrJ,aAAa,EAAE,KAAK,CAAC,WAAW,MAAM,CAAC,CAAC,CAAC,QAAQ,SAAS,CAAC,CAAC,SAAS,0DAA0D,CAAC,CAAC,SAAS;CAC1I,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,0KAA0K,CAAC,CAAC,SAAS;CACvN,eAAe,EAAE,QAAQ,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS;CAC5G,gBAAgB,EAAE,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C,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS;EACtG,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChH,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,iEAOhB;AACV,CAAC"}
|
package/dist/catalog.cjs
CHANGED
|
@@ -7,7 +7,13 @@ const openperplexCatalog = {
|
|
|
7
7
|
"category": "Artificial Intelligence",
|
|
8
8
|
"logo": "https://logos.composio.dev/api/openperplex",
|
|
9
9
|
"authKind": "keystroke",
|
|
10
|
-
"oauthScopes": []
|
|
10
|
+
"oauthScopes": [],
|
|
11
|
+
"credentialFields": { "api_key": {
|
|
12
|
+
"label": "Openperplex API Key",
|
|
13
|
+
"secret": true,
|
|
14
|
+
"description": "Your Openperplex API key for authentication"
|
|
15
|
+
} },
|
|
16
|
+
"credentialScheme": "API_KEY"
|
|
11
17
|
};
|
|
12
18
|
//#endregion
|
|
13
19
|
exports.openperplexCatalog = openperplexCatalog;
|
package/dist/catalog.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.cjs","names":[],"sources":["../src/catalog.ts"],"sourcesContent":["/** Generated — kept in sync with src/app.ts. */\nexport const openperplexCatalog = {\n \"slug\": \"openperplex\",\n \"name\": \"Openperplex\",\n \"description\": \"Openperplex API provides powerful, global search capabilities and web content analysis for AI applications.\",\n \"category\": \"Artificial Intelligence\",\n \"logo\": \"https://logos.composio.dev/api/openperplex\",\n \"authKind\": \"keystroke\",\n \"oauthScopes\": []\n} as const;\n"],"mappings":";;AACA,MAAa,qBAAqB;CAChC,QAAQ;CACR,QAAQ;CACR,eAAe;CACf,YAAY;CACZ,QAAQ;CACR,YAAY;CACZ,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"catalog.cjs","names":[],"sources":["../src/catalog.ts"],"sourcesContent":["/** Generated — kept in sync with src/app.ts. */\nexport const openperplexCatalog = {\n \"slug\": \"openperplex\",\n \"name\": \"Openperplex\",\n \"description\": \"Openperplex API provides powerful, global search capabilities and web content analysis for AI applications.\",\n \"category\": \"Artificial Intelligence\",\n \"logo\": \"https://logos.composio.dev/api/openperplex\",\n \"authKind\": \"keystroke\",\n \"oauthScopes\": [],\n \"credentialFields\": {\n \"api_key\": {\n \"label\": \"Openperplex API Key\",\n \"secret\": true,\n \"description\": \"Your Openperplex API key for authentication\"\n }\n },\n \"credentialScheme\": \"API_KEY\"\n} as const;\n"],"mappings":";;AACA,MAAa,qBAAqB;CAChC,QAAQ;CACR,QAAQ;CACR,eAAe;CACf,YAAY;CACZ,QAAQ;CACR,YAAY;CACZ,eAAe,CAAC;CAChB,oBAAoB,EAClB,WAAW;EACT,SAAS;EACT,UAAU;EACV,eAAe;CACjB,EACF;CACA,oBAAoB;AACtB"}
|
package/dist/catalog.d.cts
CHANGED
|
@@ -8,6 +8,14 @@ declare const openperplexCatalog: {
|
|
|
8
8
|
readonly logo: "https://logos.composio.dev/api/openperplex";
|
|
9
9
|
readonly authKind: "keystroke";
|
|
10
10
|
readonly oauthScopes: readonly [];
|
|
11
|
+
readonly credentialFields: {
|
|
12
|
+
readonly api_key: {
|
|
13
|
+
readonly label: "Openperplex API Key";
|
|
14
|
+
readonly secret: true;
|
|
15
|
+
readonly description: "Your Openperplex API key for authentication";
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
readonly credentialScheme: "API_KEY";
|
|
11
19
|
};
|
|
12
20
|
//#endregion
|
|
13
21
|
export { openperplexCatalog };
|
package/dist/catalog.d.mts
CHANGED
|
@@ -8,6 +8,14 @@ declare const openperplexCatalog: {
|
|
|
8
8
|
readonly logo: "https://logos.composio.dev/api/openperplex";
|
|
9
9
|
readonly authKind: "keystroke";
|
|
10
10
|
readonly oauthScopes: readonly [];
|
|
11
|
+
readonly credentialFields: {
|
|
12
|
+
readonly api_key: {
|
|
13
|
+
readonly label: "Openperplex API Key";
|
|
14
|
+
readonly secret: true;
|
|
15
|
+
readonly description: "Your Openperplex API key for authentication";
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
readonly credentialScheme: "API_KEY";
|
|
11
19
|
};
|
|
12
20
|
//#endregion
|
|
13
21
|
export { openperplexCatalog };
|
package/dist/catalog.mjs
CHANGED
|
@@ -7,7 +7,13 @@ const openperplexCatalog = {
|
|
|
7
7
|
"category": "Artificial Intelligence",
|
|
8
8
|
"logo": "https://logos.composio.dev/api/openperplex",
|
|
9
9
|
"authKind": "keystroke",
|
|
10
|
-
"oauthScopes": []
|
|
10
|
+
"oauthScopes": [],
|
|
11
|
+
"credentialFields": { "api_key": {
|
|
12
|
+
"label": "Openperplex API Key",
|
|
13
|
+
"secret": true,
|
|
14
|
+
"description": "Your Openperplex API key for authentication"
|
|
15
|
+
} },
|
|
16
|
+
"credentialScheme": "API_KEY"
|
|
11
17
|
};
|
|
12
18
|
//#endregion
|
|
13
19
|
export { openperplexCatalog };
|
package/dist/catalog.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.mjs","names":[],"sources":["../src/catalog.ts"],"sourcesContent":["/** Generated — kept in sync with src/app.ts. */\nexport const openperplexCatalog = {\n \"slug\": \"openperplex\",\n \"name\": \"Openperplex\",\n \"description\": \"Openperplex API provides powerful, global search capabilities and web content analysis for AI applications.\",\n \"category\": \"Artificial Intelligence\",\n \"logo\": \"https://logos.composio.dev/api/openperplex\",\n \"authKind\": \"keystroke\",\n \"oauthScopes\": []\n} as const;\n"],"mappings":";;AACA,MAAa,qBAAqB;CAChC,QAAQ;CACR,QAAQ;CACR,eAAe;CACf,YAAY;CACZ,QAAQ;CACR,YAAY;CACZ,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"catalog.mjs","names":[],"sources":["../src/catalog.ts"],"sourcesContent":["/** Generated — kept in sync with src/app.ts. */\nexport const openperplexCatalog = {\n \"slug\": \"openperplex\",\n \"name\": \"Openperplex\",\n \"description\": \"Openperplex API provides powerful, global search capabilities and web content analysis for AI applications.\",\n \"category\": \"Artificial Intelligence\",\n \"logo\": \"https://logos.composio.dev/api/openperplex\",\n \"authKind\": \"keystroke\",\n \"oauthScopes\": [],\n \"credentialFields\": {\n \"api_key\": {\n \"label\": \"Openperplex API Key\",\n \"secret\": true,\n \"description\": \"Your Openperplex API key for authentication\"\n }\n },\n \"credentialScheme\": \"API_KEY\"\n} as const;\n"],"mappings":";;AACA,MAAa,qBAAqB;CAChC,QAAQ;CACR,QAAQ;CACR,eAAe;CACf,YAAY;CACZ,QAAQ;CACR,YAAY;CACZ,eAAe,CAAC;CAChB,oBAAoB,EAClB,WAAW;EACT,SAAS;EACT,UAAU;EACV,eAAe;CACjB,EACF;CACA,oBAAoB;AACtB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keystrokehq/openperplex",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@keystrokehq/keystroke": "
|
|
34
|
+
"@keystrokehq/keystroke": ">=0.1.4",
|
|
35
35
|
"zod": "^4.4.3"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|