🔥 VectifyAI / OpenKB - OpenKB: Open LLM Knowledge Base
GitHub热门项目 | OpenKB: Open LLM Knowledge Base | Stars: 2,349 | 208 stars today | 语言: Python
找到 729 篇相关文章
GitHub热门项目 | OpenKB: Open LLM Knowledge Base | Stars: 2,349 | 208 stars today | 语言: Python
GitHub热门项目 | An LLM-powered knowledge curation system that researches a topic and generates a full-length report with citations. | Stars: 28,738 | 199 stars today | 语言: Python
GitHub热门项目 | Turn any AI agent into an AI Scientist. The #1 Agent Skills library for science, used by 160,000+ scientists worldwide. 140 ready-to-use skills plus 100+ scientific databases covering biology, chemistry, medicine, and drug discovery. Compatible with Cursor, Claude Code, Codex, Pi, Antigravity, and the open Agent Skills standard. | Stars: 28,736 | 174 stars today | 语言: Python
How to Access 50+ Chinese AI Models Through One API The Chinese AI ecosystem exploded in 2025-2026. DeepSeek dropped training costs by an order of magnitude. Qwen 3 ships 19 variants from 0.6B to 235B parameters. GLM-5 competes head-to-head with GPT-5 at 3% of the price. There's Kylin, Yi-Lightning, Hunyuan-T1, MiniMax-M1, Step-2-16K, and 40+ more models from a dozen labs. The models are incredible. The fragmentation is not. Every lab has its own API. Different auth headers. Different response formats. Different streaming protocols. Different error codes. If you wanted to try 5 models from 5 Chinese labs last year, you'd need 5 SDKs and 5 billing dashboards. Nobody has time for that. This is exactly the problem AIWave was built to solve. One API Key. 50+ Models. Zero Code Changes. AIWave is a unified API gateway that aggregates 50+ Chinese AI models behind a single endpoint. It speaks the OpenAI API format, which means every existing tool, SDK, and codebase in your stack works without modification. Here's what that looks like in practice: from openai import OpenAI # Point to AIWave instead of OpenAI client = OpenAI ( base_url = " https://api.aiwave.live/v1 " , api_key = " sk-your-aiwave-key " ) # Use DeepSeek V4 Pro response = client . chat . completions . create ( model = " deepseek-v4-pro " , messages = [{ " role " : " user " , " content " : " Explain MoE architecture " }] ) # Switch to GLM-5 — change one string response = client . chat . completions . create ( model = " glm-5 " , messages = [{ " role " : " user " , " content " : " Explain MoE architecture " }] ) # Try Qwen 3 235B — same thing response = client . chat . completions . create ( model = " qwen3-235b " , messages = [{ " role " : " user " , " content " : " Explain MoE architecture " }] ) That's it. Whatever you're already using — the OpenAI Python SDK, LangChain, LlamaIndex, Vercel AI SDK, a custom fetch wrapper — continues to work. You change the base URL and the model name, and suddenly you have acce
🐍 Python for DevOps — Class 5 Notes Topic: String Methods, Conditional Statements ( if/elif/else ), Loops ( for , range() ) 📌 Key Concepts Overview Concept One-Line Definition String Methods Built-in functions to inspect and transform strings if / elif / else Execute code blocks based on conditions for loop Iterate over any iterable — string, list, range, dict range() Generate a sequence of numbers to loop over Nested if An if block inside another if block Nested for A for loop inside another for loop 🔤 Part 1 — String Methods (Continuation from Class 4) Checking String Case # islower() — True if ALL characters are lowercase ' devops ' . islower () # True ' Devops ' . islower () # False # isupper() — True if ALL characters are uppercase ' DEVOPS ' . isupper () # True ' Devops ' . isupper () # False # Practical: normalize before comparing env = input ( ' Enter environment: ' ) if env . lower () == ' production ' : print ( ' ⚠️ Deploying to PROD! ' ) Checking Digit / Numeric Strings Method Accepts Rejects DevOps Use isdecimal() 0-9 only decimals, superscripts Port validation isdigit() 0-9 + superscripts decimal points Version numbers isnumeric() 0-9 + superscripts + fractions decimal points Broadest check # Key difference — decimal point breaks all three ' 8080 ' . isdecimal () # True ' 8080 ' . isdigit () # True ' 8080 ' . isnumeric () # True ' 80.80 ' . isdecimal () # False — dot is not a digit ' 80.80 ' . isdigit () # False ' 80.80 ' . isnumeric () # False # DevOps use: validate user input before casting port_input = input ( ' Enter port: ' ) if port_input . isdecimal (): port = int ( port_input ) else : print ( ' ❌ Invalid port — must be a whole number ' ) replace() — Find and Replace in Strings # str.replace('old', 'new') ' Python ' . replace ( ' P ' , ' J ' ) # 'Jython' ' prod-server-01 ' . replace ( ' - ' , ' _ ' ) # 'prod_server_01' ' This is python class ' . replace ( ' i ' , ' a ' ) # 'Thas as python class' — ALL occurrences # DevOps: sanitize strings for us
🌿 Introduction As climate awareness grows, individuals are looking for actionable ways to reduce their personal carbon footprints. However, most carbon calculators are either too complex or offer generic, unhelpful advice. To solve this, I built CarbonWise —a production-ready Carbon Footprint Awareness Platform. It combines deterministic scientific carbon calculations with real-time, personalized AI reduction strategies using the Groq LLM API. Here is a technical deep-dive into how I built, secured, and optimized this application for the PromptWars: Virtual challenge. 🏗️ Architecture & System Design The application is designed to be lightweight, secure, and highly performant, avoiding heavy framework overhead. System Data Flow ┌──────────────────────────────────────────────────────────┐ │ User Browser │ └─────────────┬──────────────────────────────▲─────────────┘ │ HTTPS (POST / GET) │ Rendered HTML/CSS ┌─────────────▼──────────────────────────────┴─────────────┐ │ Flask App (app.py) │ └─────────────┬──────────────┬───────────────▲─────────────┘ │ │ │ ┌─────────────▼──────────┐ ┌─▼─────────────┐ │ │ SQLite DB (carbon.db) │ │Secure Session │ │ │ - Users & Logs │ │ Cookies │ │ │ - WAL Mode Enabled │ └───────────────┘ │ └────────────────────────┘ │ Structured JSON Insights ┌────────────────────────────────────────────┴─────────────┐ │ Groq API (Llama 3.1) │ │ - Model: llama-3.1-8b-instant │ └──────────────────────────────────────────────────────────┘ Backend : Flask (Python) handles routing, user session state, and database operations. Database : SQLite manages users and logs. We activated WAL (Write-Ahead Logging) mode to enable concurrent reads and writes. AI Engine : Connects to the Groq API using the ultra-fast Meta Llama 3.1 8B model ( llama-3.1-8b-instant ). Frontend : Rendered server-side with Jinja2 templates and styled with a custom dark-mode glassmorphism design system in Vanilla CSS. ⚙️ Feature Deep-Dive 1. Deterministic Carbon Calculations ( carbon_engine.p
You wire up OCR for your KYC flow, point it at a national ID card, and get back a clean { name, idNumber, dateOfBirth } . Ship it. Then you onboard your second country — and it falls apart. Fields you mapped don't exist. The name comes back as garbled Latin. The date of birth says the year 2567. Here's the thing nobody tells you when you start: the hard part of national ID OCR isn't the OCR. It's that every country's ID is a different document. A model that reads text off a card is table stakes. Turning 30 countries' cards into data your system can actually use is where the work is. Let me show you the three axes of variation that will bite you, then how to architect so they don't. Axis 1: the fields are different There is no universal "national ID" schema, because the cards themselves don't agree on what to print. A Thai ID card prints the holder's religion . A German ID card prints height and eye color . A Chinese ID card prints ethnicity and the issuing authority. None of these are edge cases — they're core fields on those documents. So the instinct to define one IdCard type with a fixed set of columns is wrong from day one. Either you drop information that some countries consider essential, or you end up with a sparse table full of null s and country-specific special-casing. And it's not just which fields exist — it's what they're called and how they're split. The same "name" concept might come back as a single full-name string on one card and as separate given/family fields on another, sometimes in two scripts at once. Your data model has to treat "the field set depends on the country" as a first-class fact, not an afterthought. Axis 2: the script is different If your users are global, a lot of their names are not in the Latin alphabet — Chinese, Thai, Arabic, and more. The naive move is to transliterate everything to Latin "so it's consistent." Don't. Transliteration is lossy and ambiguous: multiple native spellings collapse to the same Latin form, diacritics
GitHub热门项目 | Transform unstructured text into structured knowledge with LLMs. Graphs, hypergraphs, and spatio-temporal extractions — with one command. | Stars: 1,723 | 124 stars today | 语言: Python
AI Observability for Lovable Apps: Monitor Prompts, Traces, and Evaluations with Currai Building AI applications has never been easier. Tools like Lovable allow developers and founders to create AI-powered products in minutes. Whether you're building a chatbot, AI assistant, recommendation engine, AI agent, or prediction app, generating the application is often the easy part. The real challenge starts after launch. How do you know what prompts are being sent to the model? How do you debug unexpected AI responses? How do you compare prompt variations and determine which performs better? How do you evaluate output quality over time? How do you track token usage and costs? This is exactly why we built Currai . What is Currai? Currai is an AI observability platform that helps teams understand, test, and improve AI applications in production. It provides: Prompt tracing AI request monitoring Session tracking Prompt versioning A/B testing LLM evaluations Cost and token analytics OpenTelemetry support Instead of guessing why your AI application produced a particular response, Currai lets you inspect the entire execution flow. The Problem With AI Applications Traditional monitoring tools were built for APIs, databases, and backend services. AI applications introduce a completely different set of challenges: Prompt changes can significantly impact output quality Model updates can affect behavior Hallucinations are difficult to track User conversations are hard to debug Prompt experiments are often unmanaged Quality evaluation is usually manual When something goes wrong, application logs alone don't provide enough visibility. You need observability designed specifically for AI systems. Trace Every AI Request Currai captures every prompt, model response, latency metric, token usage, and cost. You can inspect: System prompts User prompts Model outputs Execution traces Tool calls Metadata This makes debugging AI applications dramatically easier. Run Prompt A/B Tests Prompt engin
AI-disclosure: AI-assisted draft, human-reviewed. The demo numbers are the verbatim stdout of a deterministic, stdlib-only Python script included in full below — re-run it and you get the same bytes. The attempt counts in that script are a SYNTHETIC fixture I chose to exercise the accounting mechanism, calibrated to the retry skew I see in my own scraper logs (run counts from my Apify history). It is NOT a benchmark of any named vendor's API or prices. The one external claim (the cost-per-successful-task formula) is attributed and linked. The cheaper API was 2.5x cheaper per call. The monthly bill came in higher anyway. Not by a rounding error. The "cheap" option cost 1.63x more per successful task than the one with the bigger sticker price. Same workload. The price page never showed me that number, because the price page doesn't know your success rate. You do — after you've already paid. This is the arithmetic the per-call price hides. And it's a decision you make before you spend, not a cap you bolt on after. TL;DR You compare two API tiers by per-call (or per-token) price and pick the cheaper one. That ranking can be wrong. You pay for every attempt — success or fail. The denominator that pays the bills is successful tasks , not calls. True cost = price_per_attempt × attempts ÷ successes . A cheap tier with a low success rate burns its discount on retries. In the run below: cheap tier $0.0020 /call but $0.0096 /success; robust tier $0.0050 /call but $0.0059 /success. The sticker winner loses . For anyone choosing an API, model, or tier for an agent: log attempts and successes for a week, divide, then decide. A 70-line script is at the bottom — drop in your numbers. The price page is a sticker, not a bill Here's the trap, stated plainly. The number on the pricing page is per call . The number on your invoice is per call too — but the value you got is per successful task . Those are different denominators, and the gap between them is exactly the work that failed. E
GitHub热门项目 | Low code web framework for real world applications, in Python and Javascript | Stars: 10,263 | 59 stars this week | 语言: Python
GitHub热门项目 | The CLI and skills that turn any coding assistant into an expert at creating, evaluating, and deploying AI agents on Google Cloud. | Stars: 2,973 | 197 stars this week | 语言: Python
GitHub热门项目 | Qlib is an AI-oriented Quant investment platform that aims to use AI tech to empower Quant Research, from exploring ideas to implementing productions. Qlib supports diverse ML modeling paradigms, including supervised learning, market dynamics modeling, and RL, and is now equipped with https://github.com/microsoft/RD-Agent to automate R&D process. | Stars: 44,719 | 144 stars today | 语言: Python
GitHub热门项目 | | Stars: 31,754 | 480 stars today | 语言: Python
GitHub热门项目 | Free and Open Source Machine Translation API. Self-hosted, offline capable and easy to setup. | Stars: 14,817 | 179 stars today | 语言: Python
GitHub热门项目 | Official Python inference and LoRA trainer package for the LTX-2 audio–video generative model. | Stars: 7,389 | 47 stars today | 语言: Python
1. Python Ortam Kontrolü (Windows CLI) Python sürüm kontrol python --version py --version where python pip kontrol pip --version python -m pip --version pip güncelleme (kritik) python -m pip install --upgrade pip 2. Python Çalıştırma Mekanizması (Windows Standard) Script çalıştırma python app.py Py launcher ile sürüm seçme py app.py py -3 .12 app.py py -3 .11 app.py Modül çalıştırma python -m mymodule 3. Sanal Ortam (venv) – Kurumsal Standart Oluşturma python -m venv venv Aktivasyon (PowerShell) venv \S cripts \A ctivate.ps1 Aktivasyon (CMD) venv \S cripts \a ctivate.bat Deaktivasyon deactivate Sanal ortam kontrol where python where pip pip list 4. requirements.txt Yönetimi Oluşturma pip freeze > requirements.txt Kurulum pip install -r requirements.txt Güncelleme pip install --upgrade -r requirements.txt 5. Paket Yönetimi (pip Core Set) Paket yükleme pip install requests Versiyon sabitleme pip install requests == 2.31.0 Paket kaldırma pip uninstall requests Listeleme pip list Güncellenebilir paketler pip list --outdated 6. Windows .env Yönetimi (Konfigürasyon Standardı) .env dosyası oluşturma notepad .env Örnek içerik DEBUG=True API_KEY=123456 DB_URL=localhost Python tarafı (.env kullanımı) pip install python-dotenv from dotenv import load_dotenv import os load_dotenv () api_key = os . getenv ( " API_KEY " ) print ( api_key ) 7. Sistem Komutları ve Process Yönetimi Process listeleme tasklist Python process filtreleme tasklist | findstr python Process sonlandırma taskkill /PID 1234 /F Python process kill taskkill /IM python.exe /F 8. Dosya İşlemleri (CLI seviyesinde) Dosya listesi dir Klasör değiştirme cd project Dosya silme del file.txt Klasör silme rmdir /S /Q folder 9. Log ve Debug Yönetimi Dosya log izleme (PowerShell) Get-Content app.log -Wait Son satırlar Get-Content app.log -Tail 100 Filtreleme Select-String "ERROR" app.log 10. Uzaktan Erişim (Windows → SSH) SSH bağlantı ssh user@server_ip Dosya gönderme scp app.py user@server_ip:C: \U sers \u ser \ Klasör gön
If you've ever felt like LangChain was too heavy, you're not alone. The dependency tree is enormous. Abstraction layers pile up. At some point you lose track of what's actually happening underneath. That frustration has pushed a lot of people toward lighter alternatives — frameworks that prove you can build a capable agent without a hundred transitive dependencies. Agno is one of those alternatives. It started as Phidata and rebranded in early 2025. I spent an afternoon installing Agno v2.6.17 in a clean sandbox and running through Calculator tools, Wikipedia retrieval, Pydantic structured output, and a two-agent Team. I'll share the real execution logs and, more importantly, the traps I hit that the docs don't warn you about. What Agno Is and Where It Came from Phidata built a solid reputation as "the Python framework for AI assistants." When it rebranded to Agno in 2025, the design philosophy got articulated more clearly around three ideas. Model-agnostic from day one. Over 70 LLMs — OpenAI, Anthropic, Google, Ollama, Cohere — can plug in with the same code structure. Swap the model, keep the agent logic. Multimodal as a default. Text, image, audio, video agents all use the same API surface. You don't need a different abstraction layer for each modality. Multi-agent orchestration as a first-class citizen. The Team class is built in. You can switch between coordinate , route , and collaborate modes with a single parameter change. Reading that, I thought: "How is this different from LangChain?" The answer showed up when I actually wrote code. Agno favors composition over class inheritance. One agent takes about 6 lines to set up. There's far less boilerplate to wade through. Installation: No Dependency Hell pip install agno google-genai ddgs wikipedia The agno package installs just the core. Tools require their own extra dependencies — wikipedia for the Wikipedia tool, google-genai for Gemini. This lazy-loading approach keeps the base install clean. $ python3 -c "im
The Cryptographic Trust Problem (Why Webhooks Are Unforgiving) Webhooks are the nervous system of modern production apps. Whether you are processing a payment on Stripe, tracking a subscription on Lemon Squeezy, or fulfilling an order via Shopify, webhooks are how external platforms tell your backend: "Hey, something important just happened". Because these webhook endpoints have to be publicly accessible, they are prime targets for malicious actors. To prevent this, platforms use cryptographic signature verification . The Golden Rule of Verification When a provider sends a webhook, they take the HTTP request body and hash it with a shared secret key using HMAC-SHA256 . They pass this resulting signature in the request headers (like Stripe-Signature). When the request hits your server, your code has to do the exact same math: Grab the shared secret. Grab the exact raw bytes of the incoming request body. Hash them together and compare your result with the signature in the header. This process is completely binary and zero-tolerance. If your backend framework alters even a single byte—adding a trailing newline, stripping a whitespace, or reordering a JSON key during parsing—the math changes entirely. The signatures won't match, and the verification will fail. This brings us to our fundamental architectural bottleneck: to verify a webhook, you must intercept the request before your framework touches it. Why Python/Werkzeug Struggles If you build a Cloud Function in Python using the Firebase Functions SDK, you are working on top of Flask, which relies on Werkzeug to handle the underlying web server mechanics. Werkzeug is fantastic for standard web apps, but it has a specific architectural design that makes webhook verification a nightmare: it treats the incoming request body as a one-time, sequential input stream. The Single-Consumption Stream Under the WSGI (Web Server Gateway Interface) standard that powers Python web frameworks, the network payload arrives as an activ
你知道吗?GitHub 上有一个 17,889 Stars 的开源项目,能让你的 AI Agent 拥有跨会话的持久记忆——不是简单的向量检索,而是一个会自动进化的知识图谱。但大多数开发者只用它来做基础的文档搜索,完全忽略了它真正的能力。 Cognee 是一个开源 AI 记忆平台,它把知识图谱、向量搜索和认知本体论生成统一到一个记忆层中。在 2026 年,AI Agent 正从单轮对话机器人向长时间运行的自主系统演进,而瓶颈不再是模型能力,而是上下文管理。以下是大多数人不知道的五个隐藏用法。 隐藏用法 #1:自动图谱同步的会话记忆 大多数人的做法:把对话历史存在简单的列表或向量数据库里,上下文长了就塞进 prompt。这在前几轮还行,但会话一长就迅速退化。 隐藏技巧:Cognee 的会话记忆充当快速缓存,会在后台自动同步到持久化知识图谱。你既能获得内存上下文的速度,又能拥有图数据库的持久性——而且同步过程完全不需要手动编排。 import cognee import asyncio async def agent_session (): # 会话记忆——快速、临时、按会话隔离 await cognee . remember ( " 用户询问了 Q3 收入趋势并请求导出 CSV。 " , session_id = " support_ticket_4421 " ) # 后续查询会话记忆(快速路径) results = await cognee . recall ( " 用户问了什么收入相关的问题? " , session_id = " support_ticket_4421 " ) # 会话结束时,会话记忆自动同步到永久图谱 # 无需手动导出,不会丢失任何数据 asyncio . run ( agent_session ()) 效果:你的 Agent 在会话内部保持对话上下文以实现快速响应,但会话结束后不会丢失任何信息。知识图谱会自动跨所有会话积累洞察。 数据来源:Cognee GitHub 17,889 Stars,README 文档中 session_id 参数和自动同步行为在"Use with AI Agents"章节有详细说明。 隐藏用法 #2:面向领域推理的本体论 grounding 大多数人的做法:把文档灌入向量数据库,依赖语义相似性做检索。模糊匹配还行,但当你需要结构化的、领域感知的推理时就不行了。 隐藏技巧:Cognee 的 cognify 流水线不只是嵌入文档——它会从你的数据中生成认知本体论,创建带有类型化关系的结构化知识图谱。这意味着你的 Agent 可以对实体及其连接进行推理,而不仅仅是找到相似的文本。 import cognee import asyncio async def build_domain_memory (): # 摄入领域文档 await cognee . remember ( """ 客户 Acme Corp 有 3 个活跃订阅。 订阅 A:企业计划,到期日 2026-09-15。 订阅 B:入门计划,已于 2026-03-01 到期。 客户经理是 Sarah Chen。 升级路径:Sarah -> 销售副总裁 -> CRO。 """ ) # Cognee 自动提取实体和关系: # (Acme Corp) --拥有--> (订阅 A) # (订阅 A) --类型--> (企业计划) # (订阅 A) --到期--> (2026-09-15) # (Sarah Chen) --管理--> (Acme Corp) # 现在进行结构化精确查询 results = await cognee . recall ( " 哪些客户在未来 90 天内订阅到期? " ) # 返回 Acme Corp 及具体订阅和日期—— # 而不仅仅是"关于订阅的相似文本" asyncio . run ( build_domain_memory ()) 效果:你的 Agent 不再依赖向量相似性碰运气,而是从理解实体类型、关系和时间约束的本体论中获得结构化答案。 数据来源:Cognee README "Product Features"章节描述了"ontology grounding"和"cognitive-science-grounded ontology generation";ArXiv 论文 2505.24478 关于优化知识图谱与 LLM 的接口。 隐藏用法 #3:通过共享图谱实现跨 Agent 知识共享 大多数人的做法:每个 Agent 维护自己独立的记忆。客服 Agent 无法受益于销售 Agent 昨天学到的东西。知识按设计被隔离。 隐藏技巧:Cognee 的知识图谱是一个共享基础设施层。多个基于不同框