Giter Club home page Giter Club logo

ai-util's Introduction

AI Util

A unified platform to build apps with AI.

Features

Installation

go get github.com/ztkent/ai-util

Example

    client, _ := aiutil.NewAIClient("openai", "gpt-3.5-turbo", 0.5)
    conversation := aiutil.NewConversation("You are an example assistant.", 100000, true)
    response, _ := client.SendCompletionRequest(CtxWithTimeout, conversation, "Say hello!")

Required API Keys

Service Environment Variable
OpenAI OPENAI_API_KEY
Anyscale ANYSCALE_ENDPOINT_TOKEN
Replicate REPLICATE_API_TOKEN

Available Models

OpenAI Models

Model Name Model Identifier Cost (IN/OUT per 1M tokens)
GPT-3.5 Turbo gpt-3.5-turbo $0.50 / $1.50
GPT-4 gpt-4 $30.00 / $60.00
GPT-4 Turbo gpt-4-turbo $10.00 / $30.00

Anyscale Models

Model Name Model Identifier Cost (IN/OUT per 1M tokens)
Meta Llama 2-13b Chat meta-llama/Llama-2-13b-chat-hf $0.25 / $0.25
Meta Llama 2-70b Chat meta-llama/Llama-2-70b-chat-hf $1.00 / $1.00
Meta Llama 3-8b Chat meta-llama/Llama-3-8b-chat-hf $0.15 / $0.15
Meta Llama 3-70b Chat meta-llama/Llama-3-70b-chat-hf $1.00 / $1.00
Mistral 7B Instruct mistralai/Mistral-7B-Instruct-v0.1 $0.15 / $0.15
Mixtral 8x7B Instruct mistralai/Mixtral-8x7B-Instruct-v0.1 $0.50 / $0.50
Code Llama 70b codellama/CodeLlama-70b-Instruct-hf $1.00 / $1.00

Replicate Models

Model Name Model Identifier Cost (IN/OUT per 1M tokens)
Meta Llama 2-70b meta/llama-2-70b $0.65 / $2.75
Meta Llama 2-13b meta/llama-2-13b $0.10 / $0.50
Meta Llama 2-7b meta/llama-2-7b $0.05 / $0.25
Meta Llama 2-13b Chat meta/llama-2-13b-chat $0.10 / $0.50
Meta Llama 2-70b Chat meta/llama-2-70b-chat $0.65 / $2.75
Meta Llama 2-7b Chat meta/llama-2-7b-chat $0.05 / $0.25
Meta Llama 3-8b meta/meta-llama-3-8b $0.05 / $0.25
Meta Llama 3-70b meta/meta-llama-3-70b $0.65 / $2.75
Meta Llama 3-8b Instruct meta/meta-llama-3-8b-instruct $0.05 / $0.25
Meta Llama 3-70b Instruct meta/meta-llama-3-70b-instruct $0.65 / $2.75
Mistral 7B mistralai/mistral-7b-v0.1 $0.05 / $0.25
Mistral 7B Instruct mistralai/mistral-7b-instruct-v0.2 $0.05 / $0.25
Mixtral 8x7B Instruct mistralai/mixtral-8x7b-instruct-v0.1 $0.30 / $1.00

ai-util's People

Contributors

ztkent avatar

Watchers

 avatar

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.