Metadata-Version: 2.4
Name: singlow
Version: 0.2.0
Summary: SDK da plataforma Singlow — LLMs, Agentes e ML white label
Home-page: https://singlow.onrender.com
Author: Singlow
Author-email: contato@singlow.ai
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests
Requires-Dist: scikit-learn
Requires-Dist: pandas
Requires-Dist: numpy
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# 🚀 Singlow SDK

SDK oficial da plataforma **Singlow (Singularity Low)** — LLMs, agentes autónomos e Machine Learning.

---

## 📦 Instalação

pip install singlow

---

## ⚙️ Configuração

export SINGLOW_API_KEY="sk-singlow-xxxxxxxxxxxxxxxx"  
export SINGLOW_BASE_URL="https://singlow.onrender.com/v1"

---

## ⚡ Uso Rápido

### 🧠 LLMs — Acesso direto aos modelos

from singlow import LLM

llm = LLM(modelo="singlow-fast")

print(llm.chat("Explica backpropagation numa frase."))

---

### 🔄 Streaming

for token in llm.chat_stream("Conta até 5 devagar."):
    print(token, end="", flush=True)

---

## 🤖 Agentes

### 🧠 Agente com memória

from singlow import Agent

agente = Agent(nome="Marcus", modelo="singlow-fast", memoria=True)

agente.executar("O meu nome é Marius.")
print(agente.executar("Qual é o meu nome?"))  # Marius

---

### 🛠️ Agente com ferramentas

from singlow import Agent, Tool

def criar_ficheiro(nome, conteudo):
    with open(nome, "w") as f:
        f.write(conteudo)
    return f"✅ {nome} criado!"

ferramenta = Tool("criar", criar_ficheiro, "Cria ficheiro: nome, conteudo")

agente = Agent(nome="Dev", modelo="singlow-code", ferramentas=[ferramenta])

agente.executar('Cria um ficheiro "ola.txt" com "Olá mundo!"')

---

## 🤝 Múltiplos agentes

arquiteto = Agent(nome="Luna", modelo="singlow-reasoning", memoria=True)
programador = Agent(nome="Marcus", modelo="singlow-code", ferramentas=[ferramenta], memoria=True)

plano = arquiteto.executar("Cria um plano para uma calculadora Python.")
codigo = programador.executar(f"Implementa este plano: {plano}")

---

## 🧩 Modelos Disponíveis

- singlow-fast → Respostas rápidas e curtas  
- singlow-reasoning → Raciocínio profundo  
- singlow-code → Geração de código  

---

## 📊 Machine Learning

from singlow import Regressor, Classifier

# Regressão
modelo = Regressor(algoritmo="random_forest")
modelo.treinar("casas.csv", "preco")
previsao = modelo.prever({"tamanho_m2": 120, "quartos": 3})

# Classificação
modelo = Classifier(algoritmo="logistic")
modelo.treinar("clientes.csv", "aprovado")
resultado = modelo.prever({"renda": 5000, "idade": 30})

---

## 📚 Documentação

https://singlow.onrender.com/docs

---

## 📄 Licença

MIT License — ver ficheiro LICENSE
