今日已更新 292 条资讯 | 累计 24578 条内容
关于我们

标签:#git

找到 1255 篇相关文章

AI 资讯

How Do You Design and Develop APIs the Git-Native Way?

Most API teams treat the contract as an afterthought: write code, generate a spec, then watch the two drift apart. Git-native API design reverses that flow. You treat the API contract as source code, version it in Git, and review every change the same way you review application logic. Try Apidog today This guide focuses on implementation discipline, not a single tool. You’ll design contracts in branches, review them in pull requests, and turn a committed spec into mocks, tests, and docs. The goal is simple: your Git history should also be your API history. If you already know what Spec-First tooling looks like and want the product walkthrough, read the companion piece on the git-native API workflow . This article stays focused on practice. What “git-native” means for API work Git-native means your API definition lives in your repository as a plain text file. Not in a proprietary cloud database. Not behind a vendor login. A .yaml or .json file sits next to your code and is tracked by the same version control system your team already uses. In many cloud-locked API design tools, the contract lives in the vendor’s backend. You edit through a web UI, and your repository only contains an export. That export can become stale, and your Git history no longer explains how the API evolved. The git-native model inverts that relationship: The file in main is the contract. Any GUI is a view onto that file. Branches, commits, pull requests, blame, and rollback all apply to your API surface. Mocks, docs, tests, and generated clients derive from the committed spec. A git-native setup has three core properties: The spec is a text file in the repo. Changes flow through normal Git operations: branch, commit, PR, merge. Downstream artifacts derive from the committed file, not from a separate database. Why design and develop APIs in Git You already trust Git with your code. Your API contract deserves the same treatment. 1. History When someone asks, “When did we add the cursor pagination

2026-06-03 原文 →
AI 资讯

I Revived Wrisha — the Emotional AI Companion I Left for Dead"

What is Wrisha? Wrisha is a desktop emotional AI companion — an animated character who can see you, hear you, talk back, and react. The pipeline is genuinely multimodal: Vision — webcam + facial-emotion detection (OpenCV / FER) Hearing — speech-to-text so you can just talk to her Brain — an LLM generates her replies, in-character Voice — text-to-speech with mood-modulated tone Avatar — an animated face (pygame) that emotes and lip-syncs I built the bones of it a while back, got busy, and walked away. The Finish-Up-A-Thon was the push I needed to come back to it. The "before": it didn't just need polish — it was dead When I reopened the repo, the harsh truth was that the app couldn't even start. Two things had rotted: The environment was a fossil. The project was so old it wouldn't install on a modern machine. Wrong numpy, stale dependency pins, and a Python version mismatch that sent pip trying to compile packages from source and failing. Just getting it to attempt to run took a full environment rebuild on Python 3.12. The code was half-migrated and crashed on launch. I'd previously upgraded the internal modules — memory, a mood engine, a smarter brain — to a "v3" design, but I never finished wiring them into main.py. So the moment it tried to start, it died: TypeError: init () missing 2 required positional arguments: 'memory' and 'mood_engine' The "before" in one screenshot: a project that built its best features and then never connected them. I'd built the hard parts — persistent memory, a smooth mood state machine, proactive behavior — and left them sitting in files that main.py never even imported. Classic abandoned-side-project energy. The "after": three things I finished I set out to do three things, and I'm counting all three as the win. It runs again The core fix was finishing the migration: rewiring main.py to actually construct the Memory and MoodEngine, inject them into the Brain, and reference mood from the engine instead of the dead attribute it used to

2026-06-03 原文 →