Data Science & AI Integration: Il Cervello della Bottega

🧠 Data Science & AI Integration: Il Cervello della Bottega

Questa pagina raccoglie le procedure per integrare i modelli LLM (Large Language Models) e l’analisi dati nei nostri flussi di lavoro.

1. Connessione a Local LLM (vLLM/Ollama)

Utilizziamo il protocollo OpenAI-compatible per interrogare i nostri modelli ospitati on-premise.

import openai

client = openai.OpenAI(
    base_url="http://localhost:8000/v1", # Endpoint vLLM
    api_key="not-needed"
)

def ask_geppetto(prompt: str) -> str:
    """Interrogates the local LLM for coding or hardware advice."""
    response = client.chat.completions.create(
        model="deepseek-coder",
        messages=[{"role": "user", "content": prompt}]
    )
    return response.choices[0].message.content

2. Pipeline Dati

  • Preprocessing: Pulizia dati tramite NumPy/Pandas.
  • Inference: Esecuzione del modello su GPU NVIDIA tramite CUDA.
  • Post-processing: Interpretazione dei risultati per automazione Home Assistant.
Last updated on Sunday, February 15, 2026
Built with Hugo
Theme Stack designed by Jimmy