GithubHelp home page GithubHelp logo

julianpscheid / anthropic_dart Goto Github PK

View Code? Open in Web Editor NEW

This project forked from malengatiger/anthropic_dart

0.0 0.0 0.0 510 KB

Dart wrapper for access to Anthropic AI for Flutter and Dart apps

License: Other

JavaScript 39.58% Dart 60.42%

anthropic_dart's Introduction

Dart Anthropic API Package

This Dart package provides idiomatic access to the Anthropic Claude LLM's for both Dart and Flutter applications. Anthropic AI is a powerful platform for artificial intelligence and machine learning tasks, and this package simplifies integration with your Dart and Flutter projects.

The package hides the messy details of the Anthropic REST API and lets you work with nice statically typed Dart classes.

  • Request
  • RequestWithImages
  • Response
  • AnthropicService

Installation

Add the following to your pubspec.yaml:

dependencies:
  claude_dart_flutter: ^1.0.0+1

Then, run:

$ flutter pub get

Usage

Import the package where you need to use it:

import 'package:claude_dart_flutter/claude_dart_flutter.dart';

Initialize the Anthropic API client with your API key:

final service = AnthropicService(apiKey: 'your_api_key');

Now you can use the various methods provided by the Anthropic API. For example:

Send a request to the Anthropic completions endpoint.

var request = Request();
final Response response = await service.sendRequest(request); 
Send a request to the Anthropic text and image completions endpoint.

```dart
var request = RequestWithImages();
final Response response = await service.sendRequestWithImages(request); 

A quick way to check whether things are cool is by sending a Hello request to the Anthropic Chat Completions endpoint.

final List<Response> response = await service.sendHello(); 

Authentication

You need an API key from Anthropic AI to use this package. Get registered and get an API key here: Anthropic AI Website

Example

You can find a simple example in the example directory of this repository.

Issues and Feedback

Please file any issues, bugs, or feature requests in the issue tracker.

License

This package is licensed under the MIT License. See the LICENSE file for details.

anthropic_dart's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.