Nage KLM — Knowledge Lifecycle Model API client
Project description
nage
Python SDK for Nage KLM — Knowledge Lifecycle Model API.
pip install nage
Quick Start
import nage
client = nage.Client("nk_live_...")
# Temel kullanım
response = client.think("Python'da async/await nedir?")
print(response.response)
print(response.stemma)
# STEMMA(MING/coding: 0.62, FEHM/turkish-context: 0.38)
# STEMMA attribution
for varve, weight in response.stemma.top(3):
print(f" {varve}: {weight:.2%}")
# Platform seç
response = client.think(
"Merge sort nasıl çalışır?",
platform="nm/ming", # MING ağırlıklı
max_tokens=1024,
)
# Streaming
for chunk in client.think_stream("Merhaba!"):
print(chunk, end="", flush=True)
# VARVE listesi
knowledge = client.knowledge
print(f"Platform: {knowledge.platform}")
print(f"Toplam VARVE: {knowledge.total_varves}")
for layer, varves in knowledge.layers.items():
print(f" {layer}: {[v.varve_id for v in varves]}")
# 4 katman tanımları
layers = client.layers()
print(layers["CORTEX"]["question"]) # "Nasıl düşünülür ve sentezlenir?"
# Sağlık kontrolü
health = client.health()
print(health["status"]) # "ok"
Async
import asyncio
import nage
async def main():
async with nage.AsyncClient("nk_live_...") as client:
response = await client.think("Merhaba!")
print(response.stemma)
async for chunk in client.think_stream("Streaming test"):
print(chunk, end="", flush=True)
asyncio.run(main())
STEMMA
Her yanıt STEMMA (kaynak atıf vektörü) içerir:
response.stemma.weights # {"MING/coding": 0.62, "FEHM/turkish-context": 0.38}
response.stemma.dominant_layer # "MING"
response.stemma.dominant_varve # "MING/coding"
response.stemma.entropy # 0.67
response.stemma.top(2) # [("MING/coding", 0.62), ("FEHM/turkish-context", 0.38)]
Platform Aliases
| Alias | Model | Ağırlık |
|---|---|---|
nage-8b |
Genel | Dengeli |
nage-14b |
Derin düşünme | CORTEX |
nm/fehm |
Türkçe odaklı | FEHM |
nm/ming |
Kod odaklı | MING |
Katmanlar
- FEHM — İletişim, kültür, diyalog
- MING — Teknik, kod, sistemler
- CHI — Alan bilgisi, olgusal
- CORTEX — Akıl yürütme, derin sentez
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nage_ai-0.1.0.tar.gz
(5.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nage_ai-0.1.0.tar.gz.
File metadata
- Download URL: nage_ai-0.1.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1ad73d8ea68f7a67b3b506577bddf7882444740f49415f9f567af4ca532f6ab
|
|
| MD5 |
e514e9b3620cbc941494b862dc85a07a
|
|
| BLAKE2b-256 |
f477d0f97954b2948ec70d1bade8275ca135da9da6a932c41065f6dfa39d52cd
|
File details
Details for the file nage_ai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nage_ai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba9a05bd096f1e9f019509cb7bc2c0ef6db3f83a4b0fd306504410e181555970
|
|
| MD5 |
b010c5bf3dbc8a66ff477e635169302d
|
|
| BLAKE2b-256 |
ccafc87e6cc2520724a5972170e3c865879aa0b8132d8560e754c078cdd9669a
|