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 Anthropic models #3

Closed
cvauclair opened this issue Sep 4, 2024 · 1 comment
Closed

feat: Add support for Anthropic models #3

cvauclair opened this issue Sep 4, 2024 · 1 comment
Assignees
Labels
model Relevant to new model providers or implementations

Comments

@cvauclair
Copy link
Contributor

cvauclair commented Sep 4, 2024

Feature Request

Add Anthropic as a new model provider for Rig.

Motivation

Anthropic (and its model Claude) is a popular model provider that Rig should support.

Proposal

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

// src/providers/anthropic.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).

@cvauclair cvauclair changed the title feat: Add model provider for Anthropic feat: Add support for Anthropic models Sep 4, 2024
@mateobelanger mateobelanger added the model Relevant to new model providers or implementations label Sep 4, 2024
@0xMochan
Copy link
Contributor

Implemented by #27

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

No branches or pull requests

3 participants