https://github.com/getty/tackleberry
Python Framework for AI Usage - Tackleberry (or TB) is helping you tackle the access to AI
https://github.com/getty/tackleberry
ai anthropic groq ollama openai python
Last synced: about 1 year ago
JSON representation
Python Framework for AI Usage - Tackleberry (or TB) is helping you tackle the access to AI
- Host: GitHub
- URL: https://github.com/getty/tackleberry
- Owner: Getty
- License: mit
- Created: 2024-12-28T04:43:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-14T22:08:25.000Z (over 1 year ago)
- Last Synced: 2025-04-11T23:52:35.021Z (about 1 year ago)
- Topics: ai, anthropic, groq, ollama, openai, python
- Language: Python
- Homepage:
- Size: 627 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[](https://github.com/Getty/tackleberry)
# Tackleberry
API may change slightly, still work in progress.
## Synopsis
```python
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`
```console
❯ pip install --upgrade tackleberry
```