Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(perplexity): add new Sonar models #957

Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
# mono occupies port 8084 which conflicts with mgmt-backend
- name: Stop mono service
run: |
sudo kill -9 `sudo lsof -t -i:8084`
sudo lsof -t -i:8084 | xargs -r sudo kill -9
sudo lsof -i -P -n | grep LISTEN

- name: Maximize build space
Expand Down
8 changes: 3 additions & 5 deletions pkg/component/ai/perplexity/v0/.compogen/bottom.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ component:
task: TASK_CHAT
input:
data:
model: llama-3.1-sonar-small-128k-online
model: sonar
messages:
- content:
- text: Be precise and concise.
Expand All @@ -25,7 +25,7 @@ component:
- text: ${variable.prompt}
type: text
role: user
name: chunhao
name: Miles
parameter:
max-tokens: 500
temperature: 0.2
Expand All @@ -37,12 +37,10 @@ component:
top-k: 0
presence-penalty: 0
frequency-penalty: 1
setup:
api-key: ${secret.perplexity}

output:
perplexity:
title: Perplexity
value: ${perplexity-0.output}

```
```
10 changes: 4 additions & 6 deletions pkg/component/ai/perplexity/v0/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Input data.
| Field | Field ID | Type | Note |
| :--- | :--- | :--- | :--- |
| [Chat Messages](#chat-chat-messages) | `messages` | array | List of chat messages. |
| Model Name | `model` | string | The model to be used for `TASK_CHAT`. <br/><details><summary><strong>Enum values</strong></summary><ul><li>`llama-3.1-sonar-small-128k-online`</li><li>`llama-3.1-sonar-large-128k-online`</li><li>`llama-3.1-sonar-huge-128k-online`</li></ul></details> |
| Model Name | `model` | string | The model to be used for `TASK_CHAT`. <br/><details><summary><strong>Enum values</strong></summary><ul><li>`sonar`</li><li>`sonar-pro`</li><li>`llama-3.1-sonar-small-128k-online`</li><li>`llama-3.1-sonar-large-128k-online`</li><li>`llama-3.1-sonar-huge-128k-online`</li></ul></details> |
</div>
<h4 id="chat-chat-messages">Chat Messages</h4>

Expand Down Expand Up @@ -204,7 +204,7 @@ component:
task: TASK_CHAT
input:
data:
model: llama-3.1-sonar-small-128k-online
model: sonar
messages:
- content:
- text: Be precise and concise.
Expand All @@ -214,7 +214,7 @@ component:
- text: ${variable.prompt}
type: text
role: user
name: chunhao
name: Miles
parameter:
max-tokens: 500
temperature: 0.2
Expand All @@ -226,12 +226,10 @@ component:
top-k: 0
presence-penalty: 0
frequency-penalty: 1
setup:
api-key: ${secret.perplexity}

output:
perplexity:
title: Perplexity
value: ${perplexity-0.output}

```
```
7 changes: 7 additions & 0 deletions pkg/component/ai/perplexity/v0/config/tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,18 @@ TASK_CHAT:
shortDescription: The model to be used.
type: string
enum:
- sonar
- sonar-pro

# Deprecated models, unavailable after 2025-02-22
- llama-3.1-sonar-small-128k-online
- llama-3.1-sonar-large-128k-online
- llama-3.1-sonar-huge-128k-online
instillCredentialMap:
values:
- sonar
- sonar-pro

- llama-3.1-sonar-small-128k-online
- llama-3.1-sonar-large-128k-online
- llama-3.1-sonar-huge-128k-online
Expand Down
Loading