Skip to content

Commit

Permalink
chore(perplexity): rename perplexity (#898)
Browse files Browse the repository at this point in the history
Because

- the name is wrong

This commit

- rename perplexity
  • Loading branch information
chuang8511 authored Dec 2, 2024
1 parent f4a316a commit 9211ba7
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ variable:

component:
perplexity-0:
type: perplexity-ai
type: perplexity
task: TASK_CHAT
input:
data:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: "Perplexity AI"
title: "Perplexity"
lang: "en-US"
draft: false
description: "Learn about how to set up a VDP Perplexity AI component https://github.com/instill-ai/instill-core"
description: "Learn about how to set up a VDP Perplexity component https://github.com/instill-ai/instill-core"
---

The Perplexity AI component is an AI component that allows users to connect the AI models served on the Perplexity Platform.
The Perplexity component is an AI component that allows users to connect the AI models served on the Perplexity Platform.
It can carry out the following tasks:
- [Chat](#chat)

Expand All @@ -19,7 +19,7 @@ It can carry out the following tasks:

## Configuration

The component definition and tasks are defined in the [definition.json](https://github.com/instill-ai/pipeline-backend/blob/main/pkg/component/ai/perplexityai/v0/config/definition.json) and [tasks.json](https://github.com/instill-ai/pipeline-backend/blob/main/pkg/component/ai/perplexityai/v0/config/tasks.json) files respectively.
The component definition and tasks are defined in the [definition.json](https://github.com/instill-ai/pipeline-backend/blob/main/pkg/component/ai/perplexity/v0/config/definition.json) and [tasks.json](https://github.com/instill-ai/pipeline-backend/blob/main/pkg/component/ai/perplexity/v0/config/tasks.json) files respectively.



Expand Down Expand Up @@ -199,7 +199,7 @@ variable:

component:
perplexity-0:
type: perplexity-ai
type: perplexity
task: TASK_CHAT
input:
data:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
"TASK_CHAT"
],
"custom": false,
"documentationUrl": "https://www.instill.tech/docs/component/ai/perplexityai",
"icon": "assets/perplexity-ai.svg",
"id": "perplexity-ai",
"documentationUrl": "https://www.instill.tech/docs/component/ai/perplexity",
"icon": "assets/perplexity.svg",
"id": "perplexity",
"public": true,
"title": "Perplexity AI",
"title": "Perplexity",
"description": "Connect the AI models served on the Perplexity Platform.",
"type": "COMPONENT_TYPE_AI",
"uid": "61339791-dfe0-4ba1-9efc-7d4452c03e53",
"vendor": "Perplexity",
"vendorAttributes": {},
"version": "0.1.0",
"sourceUrl": "https://github.com/instill-ai/pipeline-backend/blob/main/pkg/component/ai/perplexityai/v0",
"sourceUrl": "https://github.com/instill-ai/pipeline-backend/blob/main/pkg/component/ai/perplexity/v0",
"releaseStage": "RELEASE_STAGE_ALPHA"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package perplexityai
package perplexity

// We expose them because we will use them to calculate the Instill Credit
// after the IO struct is finished.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:generate compogen readme ./config ./README.mdx --extraContents bottom=.compogen/bottom.mdx
package perplexityai
package perplexity

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package perplexityai
package perplexity

import (
"bufio"
Expand Down Expand Up @@ -65,7 +65,7 @@ func (e *execution) executeTextChat(ctx context.Context, job *base.Job) error {
}

if err != nil {
return fmt.Errorf("sending chat request to Perplexity AI: %w", err)
return fmt.Errorf("sending chat request to Perplexity: %w", err)
}

if chatReq.Stream {
Expand Down
1 change: 1 addition & 0 deletions pkg/component/ai/perplexity/v0/task_chat_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package perplexity
1 change: 0 additions & 1 deletion pkg/component/ai/perplexityai/v0/task_chat_test.go

This file was deleted.

9 changes: 4 additions & 5 deletions pkg/component/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"github.com/instill-ai/pipeline-backend/pkg/component/ai/mistralai/v0"
"github.com/instill-ai/pipeline-backend/pkg/component/ai/ollama/v0"
"github.com/instill-ai/pipeline-backend/pkg/component/ai/openai/v0"
"github.com/instill-ai/pipeline-backend/pkg/component/ai/perplexityai/v0"
"github.com/instill-ai/pipeline-backend/pkg/component/ai/perplexity/v0"
"github.com/instill-ai/pipeline-backend/pkg/component/ai/stabilityai/v0"
"github.com/instill-ai/pipeline-backend/pkg/component/ai/universalai/v0"
"github.com/instill-ai/pipeline-backend/pkg/component/application/asana/v0"
Expand Down Expand Up @@ -169,10 +169,9 @@ func Init(
}

{
// PerplexityAI
conn := perplexityai.Init(baseComp)
// Secret doesn't allow hyphens
conn = conn.WithInstillCredentials(secrets["perplexityai"])
// perplexity
conn := perplexity.Init(baseComp)
conn = conn.WithInstillCredentials(secrets[conn.GetDefinitionID()])
compStore.Import(conn)
}

Expand Down

0 comments on commit 9211ba7

Please sign in to comment.