Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

satware® AI Python

satware® AI Python ist ein TypingMind-Plugin, das Python 3.14 sicher direkt im Browser ausführt - via Pyodide (WebAssembly), ohne Server, ohne Installation. Ausgaben, Matplotlib-Diagramme und Fehler mit Hinweisen erscheinen als HTML-Ansicht direkt im Chat.

Installation

TypingMind Custom: Admin-Panel -> Plugins -> Add Plugin -> GitHub-URL:

https://github.com/satwareAG/satag-python-plugin

Werkzeug: execute_python

Für Ausgaben, die der Benutzer sehen soll (Diagramme, formatierte Tabellen): rendert eine HTML-Ansicht im Chat; das Modell erhält nur eine Hinweismeldung.

Parameter Typ Beschreibung
code string Python 3.14 Code-Snippet (kein Dateisystem; Pakete werden bei Bedarf automatisch aus CDN/PyPI geladen)
packages string[] Zu ladende Pakete, z.B. ["numpy", "pandas"]; [] wenn keine nötig

Unterstützte Pakete (Pyodide-Distribution): numpy, pandas, matplotlib, scipy, scikit-learn, sympy - plus Aliase np, pd, plt, sklearn, stats.

Werkzeug: python_compute

Für Berechnungen, deren Ergebnis das Modell weiterverarbeiten soll (Summen, Statistik, Dateninspektion): führt den Code aus und liefert die gedruckte Ausgabe als Text zurück (stdout, stderr unter --- stderr ---, Begrenzung ~4 KB). Gleiche Parameter wie execute_python; show_plot() gibt einen Hinweis aus (Visualisierungen -> execute_python).

Unterstützte Pakete (Pyodide-Distribution): numpy, pandas, matplotlib, scipy, scikit-learn, sympy - plus Aliase np, pd, plt, sklearn, stats.

Beispiele

Grundlagen

import math
result = math.sqrt(16) + math.pi
print(f"Ergebnis: {result:.4f}")

Datenanalyse (pandas)

import pandas as pd
df = pd.DataFrame({'A': [1, 2, 3], 'B': [4, 5, 6]})
print(df)

(Pakete: ["pandas"] - numpy/pandas/matplotlib werden nach dem Laden automatisch als np/pd/plt importiert.)

Visualisierung (matplotlib)

import matplotlib.pyplot as plt
plt.plot([1, 2, 3], [2, 4, 9])
plt.title("Beispiel")
show_plot(dpi=120, figsize=(10, 6))

(Pakete: ["matplotlib"] - show_plot() rendert die Abbildung in die Ergebnisansicht.)

Hinweise

  • Der erste Aufruf pro Sitzung initialisiert Pyodide (ca. 10 Sekunden); danach ist die Ausführung schnell.
  • memory_status() gibt die aktuelle WASM-Heap-Größe aus.
  • Python-stdout und stderr werden beide erfasst und angezeigt.

Lizenz

MIT - siehe LICENSE. © satware AG

About

satware® AI Python - TypingMind plugin executing Python 3.14 in the browser via Pyodide/WebAssembly with package loading, matplotlib plots and stderr capture

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages