-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugin.json
59 lines (59 loc) · 1.86 KB
/
plugin.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{
"uuid": "70606b50-137b-45c3-8688-545398dc85a0",
"id": "search_via_perplexity",
"iconURL": "https://custom.typingmind.com/assets/models/perplexityai.png",
"emoji": "🔍",
"title": "Perplexity Search",
"userSettings": [
{
"name": "apiKey",
"label": "Perplexity API Key",
"type": "password",
"required": true,
"description": "Get your API Key from Perplexity: https://www.perplexity.ai/settings/api"
},
{
"name": "model",
"label": "Model",
"description": "Optional, default: \"llama-3.1-sonar-small-128k-online\"",
"defaultValue": "llama-3.1-sonar-small-128k-online"
},
{
"name": "systemMessage",
"label": "System Message",
"description": "Optional, default: \"Be precise and concise\"",
"defaultValue": "Be precise and concise"
}
],
"openaiSpec": {
"name": "search_via_perplexity",
"description": "Search for information from the internet using Perplexity.",
"parameters": {
"type": "object",
"properties": {
"keyword": {
"type": "string",
"description": "The search keyword"
}
},
"required": ["keyword"]
}
},
"httpAction": {
"id": "b156833f-9599-4155-bba9-e713dd21aa01",
"method": "POST",
"name": "",
"url": "https://api.perplexity.ai/chat/completions",
"requestBody": "{\"model\": \"{model}\",\"messages\": [{\"role\": \"system\",\"content\": \"{systemMessage}\"},{\"role\": \"user\",\"content\": \"{keyword}\"}]}",
"requestHeaders": "{\"accept\": \"application/json\",\"authorization\": \"Bearer {apiKey}\"}",
"resultTransform": {
"engine": "jmes",
"expression": "choices[*].message.content | join(' ', @)"
},
"hasResultTransform": true,
"hasBody": true,
"hasHeaders": true
},
"implementationType": "javascript",
"outputType": "respond_to_ai"
}