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: Add support for Perplexity models #4

Closed
cvauclair opened this issue Sep 4, 2024 · 0 comments · Fixed by #18
Closed

feat: Add support for Perplexity models #4

cvauclair opened this issue Sep 4, 2024 · 0 comments · Fixed by #18
Assignees
Labels
model Relevant to new model providers or implementations

Comments

@cvauclair
Copy link
Contributor

cvauclair commented Sep 4, 2024

Feature Request

Add support for Perplexity models

Motivation

Perplexity is a popular platform that offers a completion API. Although they do not develop their own models, their completion API is able to search the web to generate responses, which can be very useful when building Rig applications.

Proposal

Create a new module rig::providers::perplexity which should roughly contain the following:

// src/providers/perplexity.rs
struct Client {
  // TODO
}

struct CompletionRequest {
  // Modeled after Anthropic API
  // TODO
}

impl From<completion::CompletionRequest> for CompletionRequest {
  // TODO
}

struct CompletionResponse {
  // Modeled after Anthropic API
  // TODO
}

impl From<CompletionResponse> for completion::CompletionResponse<CompletionResponse> {
  // TODO
}

struct CompletionModel {
  // TODO
}

impl completion::CompletionModel for CompletionModel {
  // TODO
}

Note: Use the existing provider integrations as a guide (see rig::providers::openai and rig::providers::cohere).

@mateobelanger mateobelanger added the model Relevant to new model providers or implementations label Sep 4, 2024
@cvauclair cvauclair linked a pull request Sep 10, 2024 that will close this issue
@marieaurore123 marieaurore123 linked a pull request Sep 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
model Relevant to new model providers or implementations
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants