Skip to content

Python Framework for AI Usage - Tackleberry (or TB) is helping you tackle the access to AI

License

Notifications You must be signed in to change notification settings

Getty/tackleberry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tackleberry

Tackleberry

API may change slightly, still work in progress.

Synopsis

from tackleberry import TB

openai_chat = TB.chat('gpt-4o-mini')
openai_reply = openai_chat.query("Say test")

claude_chat = TB.chat('claude-3-5-sonnet-20241022')
claude_reply = claude_chat.query("Say test")

groq_chat = TB.chat('gemma2-9b-it')
groq_reply = groq_chat.query("Say test")

mistral_chat = TB.chat('open-mistral-nemo')
mistral_reply = mistral_chat.query("Say test")

# OLLAMA_PROXY_URL set for URL, can handle Basic Auth in URL
ollama_chat = TB.chat('ollama/gemma2:2b')
ollama_reply = ollama_chat.query("Say test")

from pydantic import BaseModel

class UserInfo(BaseModel):
    name: str
    age: int

# Using Structured Output Feature of Ollama - no instructor
ollama_user_info = ollama_chat.query("Extract the name and the age: 'John is 20 years old'", UserInfo)

# Using instructor[anthropic]
claude_user_info = claude_chat.query("Extract the name and the age: 'John is 20 years old'", UserInfo)

# Using instructor[groq]
groq_user_info = groq_chat.query("Extract the name and the age: 'John is 20 years old'", UserInfo)

Install

Using PIP

Stable Version with PIP

Install from PyPi

pip install --upgrade tackleberry

About

Python Framework for AI Usage - Tackleberry (or TB) is helping you tackle the access to AI

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages