Skip to main content

Minimalist Python framework for AI agents logic-only coding with streaming, tool calls, and multi-LLM provider support

Project description

open-taranis

Python framework for AI agents logic-only coding with streaming, tool calls, and multi-LLM provider support.

Installation

pip install open-taranis --upgrade

Quick Start

import open_taranis as T

client = T.clients.openrouter("api_key")

messages = [
    T.create_user_prompt("Tell me about yourself")
]

stream = T.clients.openrouter_request(
    client=client,
    messages=messages,
    model="mistralai/mistral-7b-instruct:free", 
)

print("assistant : ",end="")
for token, tool, tool_bool in T.handle_streaming(stream) : 
    if token :
        print(token, end="")

To create a simple display using gradio as backend :

import open_taranis as T
import open_taranis.web_front as W
import gradio as gr

gr.ChatInterface(
    fn=W.chat_fn_gradio(
    client=T.clients.openrouter(API_KEY),
    request=T.clients.openrouter_request,
    model="mistralai/mistral-7b-instruct:free",
    _system_prompt="You are an agent named **Taranis**"
).create_fn(),
    title="web front"
).launch()

Use the commands :

  • taranis help : in the name...
  • taranis update : upgrade the framework
  • taranis open : open the TUI

The TUI :

TUI

  • /help to start

Documentation :

Roadmap

  • v0.0.1: start
  • v0.0.x: Add and confirm other API providers (in the cloud, not locally)
  • v0.1.x: Functionality verifications in examples
  • > v0.2.0: Add features for logic-only coding approach
  • The rest will follow soon.

Changelog

  • v0.0.4 : Add xai and groq provider
  • v0.0.6 : Add huggingface provider and args for clients.veniceai_request
  • v0.1.0 : Start the docs, add update-checker and preparing for the continuation of the project...
  • v0.1.1 : Code to deploy a frontend with gradio added (no complex logic at the moment, ex: tool_calls)
  • v0.1.2 : Fixed a display bug in the web_front and experimentally added ollama as a backend
  • v0.1.3 : Fixed the memory reset in the web_front and remove ollama module for openai front (work 100 times better)
  • v0.1.4 : Fixed web_front for native use on huggingface, as well as handle_streaming which had tool retrieval issues
  • v0.1.5 : Added a TUI and commands, detection of env variables (API keys) and tools in the framework

Advanced Examples

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

open_taranis-0.1.5rc0.tar.gz (22.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

open_taranis-0.1.5rc0-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

Details for the file open_taranis-0.1.5rc0.tar.gz.

File metadata

  • Download URL: open_taranis-0.1.5rc0.tar.gz
  • Upload date:
  • Size: 22.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for open_taranis-0.1.5rc0.tar.gz
Algorithm Hash digest
SHA256 e4c2a0f292a9c2474b0fb93a1199bc4fe4f3944ebb8fc6480ceedc89f078b08b
MD5 0fe72333609a6fbffe79fc8786f00d8f
BLAKE2b-256 da856485764106720141769851cc83709f5615712cdb1b374ee91711aa07cd40

See more details on using hashes here.

File details

Details for the file open_taranis-0.1.5rc0-py3-none-any.whl.

File metadata

File hashes

Hashes for open_taranis-0.1.5rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 214deb28722650b6a8d3aaaa390f2c2aa8060219f4988997357517efbe7e2591
MD5 8567ffec91023959fba528e4d8cbf5d5
BLAKE2b-256 357c7e99764dbfa162f4c5b723c82b04870cf870cd1c22c717e1870890e61560

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page