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

AI 资讯

AI人工智能最新资讯、模型发布、研究进展

14833
篇文章

共 14833 篇 · 第 426/742 页

Dev.to

I got tired of rewriting the same AI boilerplate so I built a library to fix it

Every time I added AI to a React app, I rewrote the same 200+ lines. Streaming loop. Manual message history. Tool call orchestration. Error handling. setIsLoading(false) only if I remembered. After the third project I stopped and asked: why is nobody solving this the way RTK Query solved REST APIs? So I built Strand ( https://github.com/strand-js/strand ). Before const [messages, setMessages] = useState([]) const [isLoading, setIsLoading] = useState(false) async function send(text) { setIsLoading(true) manually stream tokens manually detect tool calls manually loop until done setIsLoading(false) only if you remembered } After const { messages, send, isPending, isStreaming, cancel } = useConversation({ system: 'You are a helpful assistant.', }) Streaming, history, tool calls, cancellation, retry; all handled. The thing nobody else has: useToolCall Works from ANY component; no prop drilling function WeatherStatus() { const { status, input, output } = useToolCall('get_weather') if (status === 'running') return <div>Checking {input?.location}…</div> if (status === 'done') return <div>{output?.temp}°F</div> return null } Live tool state: pending → running → done. Its observable anywhere in your tree. Fixing the isLoading design flaw The Vercel AI SDK has 4+ open issues ( https://github.com/vercel/ai/issues ) about isLoading getting stuck. The reason is architectural because "request sent" and "tokens arriving" are different states. Strand tracks four: const { isPending, isStreaming, isDone, error } = useConversation() // isPending: waiting for first token // isStreaming: tokens arriving // isDone: just completed // error: something failed Works with Anthropic, OpenAI, and Google Gemini npm install @strand-js/core @strand-js/react zod npm install @strand-js/anthropic # or openai, or google Swap providers by changing one server import. Zero frontend changes. v0.1.8, MIT, open source. → https://github.com/strand-js/strand

Stephen Bullocks 2026-06-23 02:47 👁 7 查看原文 →
Dev.to

SQL Formatter: a data tool that earns its tab

Developers inheriting sprawling SQL codebases or revisiting queries from weeks earlier know the frustration: a dense, unformatted block that obscures joins, filters, and logical flow. Readable SQL isn’t cosmetic — it directly affects debugging speed, peer review accuracy, and long-term maintainability. What it is SQL Formatter restructures raw SQL into clear, conventionally formatted code, running entirely in the browser. It applies consistent indentation, capitalisation of keywords, and logical line breaks — all without altering the query’s semantics. The formatter understands the syntax of all major database engines, including PostgreSQL, MySQL, SQL Server, and Oracle, so it preserves dialect-specific functions and operators rather than flattening them into a generic style. The tool is one of 200+ free browser utilities on DevTools. It processes all input entirely on your machine — no data ever leaves the browser, no account is required, and no analytics track your usage. That privacy-first design means you can safely format queries that contain proprietary business logic embedded in production SQL. The engine handles the full spectrum of SQL complexity: basic SELECT statements, multi-table joins, Common Table Expressions (CTEs), correlated subqueries, window functions, and DML operations like INSERT or UPDATE . Because it parses the input rather than applying regular expressions, deeply nested constructs retain their hierarchy, with each subquery or CTE level indented to show ownership. How to use it Paste any SQL fragment into the left-hand editor and the formatted result appears instantly in the output panel. A live preview updates as you switch formatting options, so you can tune the output without re-pasting. The primary configuration controls help you match your team’s conventions or personal preference: Dialect : selecting a specific database ensures that functions such as PostgreSQL’s STRING_AGG or MySQL’s GROUP_CONCAT are not inadvertently mangled, and th

Goksel Yesiller 2026-06-23 02:41 👁 9 查看原文 →
Dev.to

Tired of Searching for Different Base64 Tools? I Built One Place for Everything

As developers, we've all been there. Q: Need to decode a Base64 string? Open one website. Q: Need to convert an image to Base64? Open another website. Q: Need to validate a Base64 string? Search Google again. Q: Need to compare two Base64 values? Yet another tool. I found myself repeatedly switching between different websites, browser tabs, and terminal commands just to perform simple Base64-related tasks. So I decided to build something that solved this problem for me. The Goal Keep every commonly used Base64 utility in one place and make it work directly in the browser. No installations. No command-line knowledge required. No account creation. Just open the website and use the tool What You'll Find Instead of only providing an encoder and decoder, I wanted to cover the complete Base64 workflow. Some of the available tools include: Base64 Encode / Decode Image to Base64 Audio to Base64 Video to Base64 Base64 Validator Base64 Detector Base64 Compare Base64 Repair Base64 URL Encode Base64 File Decoder CSS Data URI Converter And more are being added regularly. Why I Built It Honestly, this started as a personal productivity project. I was using different Base64 tools almost every week and got tired of bookmarking multiple websites for related tasks. Having everything in one place turned out to be surprisingly useful, so I decided to make it public. Give It a Try https://base64converters.com I'm continuously improving it and would love feedback from fellow developers. Are there any Base64-related tools or workflows you use frequently that should be included?

Satyendra Vishwakarma 2026-06-23 02:37 👁 6 查看原文 →
Dev.to

How Much Does It Actually Cost to Run a Local LLM? (€ per Million Tokens, Measured)

"It runs on my own GPU, so it's basically free." I believed that until I put a meter on it. So I ran a controlled benchmark on one box — an openSUSE machine with a single RTX 3090 — driving three local models through ollama under an identical fixed workload (256-token generations in a loop for ~4 minutes each), while my open-source dashboard priced every run by the real GPU energy it burned : power sampled from nvidia-smi every 10 s, integrated over each run's exact window, multiplied by my actual day/night tariff. One number per model, in euros per million output tokens. Here's the part that made me re-run it. The tiny gemma3:1b came out at €0.118 / 1M tokens — about 5× cheaper than a hosted Flash-class API (~€0.55). But gemma3:27b 's electricity alone was €0.706 / 1M — more expensive per token than just paying the cloud, and that's before a single cent of the GPU's purchase price. "Local" didn't make it cheaper; it made it cost more and I own the depreciation. The mechanism is one line: each token costs watts ÷ throughput , and a big dense model is both slow and thirsty. A newer mid-size architecture ( gemma4:26b ) bought a lot of that back, landing at €0.272 . The full guide is methodology-first and reproducible end to end — minting an ingest key, the stdlib-only client, the exact ollama loop that reads eval_count / eval_duration for real tokens-per-second, reading each run back priced, and the honest caveats (this is marginal GPU energy only — not capex, idle, or cooling — and the absolute numbers round to fractions of a cent; the shape is the finding). Read the full guide on Medium → https://medium.com/@arsen.apostolov/how-much-does-it-actually-cost-to-run-a-local-llm-per-million-tokens-measured-4a90a7f31a48

Arsen Apostolov 2026-06-23 02:33 👁 11 查看原文 →
Dev.to

"ভালো টিম" আর "দুর্দান্ত টিম" এর মধ্যে পার্থক্য কোথায়?

গত মাসে আমাদের একটা payment system এ বারবার একই সমস্যা আসছিল। Transaction fail হচ্ছে, একজন developer ঠিক করছে, ticket close হচ্ছে। তিনদিন পর আবার একই জিনিস। আমি log গুলো দেখলাম। একই মূল কারণ। কিন্তু কেউ সেটা fix করেনি। সবাই শুধু symptom দূর করে চলে গেছে। ভেতরের অসুখটা ধরেনি। মাস শেষে হিসাব করলাম। একই সমস্যায় টিম ১০+ ঘণ্টা নষ্ট করেছে। মূল কারণটা fix করতে ৫-৬ ঘণ্টা লাগতো। সত্যি বলতে, এটা শুধু আমাদের টিমের সমস্যা না। Brain Station 23, Selise, TigerIT এর মত company গুলোতেও এই জিনিসটা দেখা যায়। প্রায় প্রতিটা software team এ। Anton Zaides, Manager.dev newsletter এর লেখক এবং ১৫+ বছরের tech experience নিয়ে কাজ করছেন। তিনি এই বিষয়ে বিস্তারিত লিখেছেন ( source )। উনার মতে, একটা "ভালো" টিম আর "দুর্দান্ত" টিমের মধ্যে পার্থক্য মোটে ৭টা ছোট অভ্যাসে। কাজ দুগুণ করা না। ১০x engineer থাকা না। শুধু কিছু habit। আমি উনার ১০টা article পড়েছি। নিজের ৫ বছরের experience মিলিয়ে, এই ৭টা habit, ২টা bonus point, আর FDE এর মত নতুন concept গুলো আমাদের দেশের software company গুলোতে কীভাবে কাজে লাগে, সেটা লিখছি। কিছু শব্দ আগেই বুঝে নিই: EM / Team Lead = Engineering Manager। আমাদের দেশে একে Team Lead, Project Lead, বা Tech Lead ও বলা হয় (যিনি টিম চালান) PM = Product Manager (যিনি কী feature বানাবে ঠিক করেন) Ticket = Jira/Trello তে কাজের একটা item PR = Pull Request (code review এর জন্য কোড submit করা) Deploy = code production server এ পাঠানো Tech Debt = এমন code বা architecture যেটা পরে সমস্যা তৈরি করবে (ঋণের মতো, পরে শোধ করতে হয়) Bottleneck = এমন একটা জায়গা যেটা পুরো কাজকে ধীর করে দেয় AI Coding Tool = Cursor, Claude Code, GitHub Copilot এর মত tool যা code লিখতে, review করতে, debug করতে সাহায্য করে FDE = Forward Deployed Engineer। engineer যিনি client এর কাছে সরাসরি থাকেন, তাদের সমস্যা বোঝেন, আর solution বানান 📌 Patch না, Root Cause ভালো টিম bug fix করে। সামনে এগোয়। কিন্তু একই bug আবার আসে। আবার fix। আবার আসে। আবার fix। একটা উদাহরণ দিই। ধরুন, আপনার পেট ব্যথা হচ্ছে বারবার। আপনি প্রতিবার painkiller খেয়ে সামলাচ্ছেন। কিন্তু ডাক্তার দেখাচ্ছেন না। এক সময় ব্যথা আরো বড় হবে। Software এও একই। bKas

Md Jamilur Rahman 2026-06-23 02:27 👁 5 查看原文 →
Dev.to

What Prime Day Taught Me About Prompt Engineering

I wanted to get better at prompt engineering. Not the trick-the-robot kind, the boring-but-useful kind: how to ask a model a question so you get an answer you can actually trust. The trouble with practicing is that most tutorials use made-up examples, and it's hard to tell a good answer from a bad one when you don't care about the topic. So I practiced on something I did care about: the deals sitting in my Amazon cart. I had a vacuum I'd been eyeing and a hair styler that was "43% off," and I genuinely wanted to know if those were good prices or just good marketing. The stakes were real, actual money on an actual decision, and that's what made it a good drill. A vague prompt gives you a confident answer, and when you actually care, you can feel that the answer is hollow. What I learned, with the real deals and the actual before-and-after prompts: The trap hiding in every deal Start with the hair styler. The listing said: Shark FlexStyle. Limited time deal. $199.00, 43% savings. List Price: $349.99. My first instinct was the prompt most people write: "Shark FlexStyle $199, 43% off list $349.99, is that a good deal?" This feels reasonable. It is also nearly useless: it lets the model answer the easy question (is 43% off a big discount? sure!) instead of the real one (is $199 actually a good price?). That $349.99 list price is a marketing anchor. A lazy prompt accepts it, and so you get a lazy "yes, great deal!" back. The fix was re-framing this: Act as a pricing analyst. I don't care whether $199 looks like a discount off list. I care whether $199 is a genuinely good price for the Shark FlexStyle right now. Before concluding, work through: (1) the actual street price over the last 6-12 months, (2) how often it drops to or below $199, (3) the real discount vs. its typical selling price, not vs. list. Cite a source and date for each price, or mark it unverified. Same question, completely different answer. What the assistant came back with, in its own telling: $199 is a

christine 2026-06-23 02:26 👁 9 查看原文 →
MIT Technology Review

Three things to watch amid Anthropic’s latest feud with the government

This story originally appeared in The Algorithm, our weekly newsletter on AI. To get stories like this in your inbox first, sign up here. For those of you enjoying your summer unaware of Anthropic’s latest feud with the US government, here’s a recap: In April the company said it had built an AI model called Mythos…

James O'Donnell 2026-06-23 02:00 👁 11 查看原文 →
Product Hunt

Rosply

AI agent that controls your computer autonomously Discussion | Link

2026-06-23 01:19 👁 4 查看原文 →
The Verge AI

Google invests in A24 to build AI movie tools

Google's DeepMind AI lab is teaming up with A24 to develop new movie production technologies that aim to help future filmmakers "expand their storytelling possibilities." As part of this new research and development collaboration, The Wall Street Journal reports that Google is investing "around $75 million" into A24, marking the first time the search giant […]

Jess Weatherbed 2026-06-23 01:18 👁 9 查看原文 →
The Verge AI

Here’s how you can reserve a Steam Machine

The Steam Machine is here, but getting one is a little complicated. Valve is taking preorders using a reservation system, which is intended to make the process more fair and harder for bots to exploit. However, it's a bit different than the $5 reservations Valve used for the Steam Deck. Starting today, you can sign […]

Stevie Bonifield 2026-06-23 01:07 👁 10 查看原文 →