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

标签:#OpenAI

找到 136 篇相关文章

AI 资讯

Microsoft and OpenAI broke up — now they’re ready to fight

At Microsoft's annual Build conference on Tuesday, the company announced a slew of new or expanded AI initiatives, including a super app, in-house reasoning models, a cybersecurity tool, and OpenClaw-esque AI agents. All this news added up to a clear message: Microsoft is positioned to be one of the biggest players in AI, and it's […]

2026-06-03 原文 →
AI 资讯

How to Integrate the OpenAI API into a Production Express App

Last year I helped a startup integrate the OpenAI API into their product. It was a chat feature — users could ask questions about their data and get natural language answers. The integration took about a day. Three days after launch, the founder messaged me: "Hey, something's wrong. Our AWS bill just showed an unexpected charge." It was $340. For three days. They had 60 users. The issue wasn't a bug — it was that production API usage looks nothing like a tutorial. The tutorial shows you openai.chat.completions.create() and returns a response. The tutorial doesn't show you what happens when users send 500-token messages, when they open 15 browser tabs each maintaining their own chat context, or when one user fires requests 30 times per minute because they think it's broken. This guide covers what the tutorials skip: rate limiting, token counting, cost guards, streaming, error handling with retries, and model selection. These aren't optional additions — they're what separates a demo from a production feature. Why Production Is Different Here's the gap between tutorial code and production code, stated plainly: Concern Tutorial Code Production Code Cost control Not mentioned Token counting, spending limits, model selection by task Rate limiting Not mentioned Per-user and per-IP limits to prevent abuse Error handling try/catch that logs to console Typed errors, retries with backoff, user-facing messages Response delivery Wait for full completion, return at once Streaming via SSE — response appears as it generates Context management Each request is independent Conversation history managed, truncated at token limit Secrets management API key hardcoded or in .env (no rotation) Rotation strategy, usage monitoring, per-feature keys Let's build a production-grade Express API that addresses all of this. We'll go layer by layer. The Architecture ┌─────────────────────────────────────────────────────────┐ │ CLIENT (Browser / Mobile) │ │ POST /api/chat { messages: [...] } │ │ GET

2026-06-03 原文 →
AI 资讯

LLM integration with OpenAI Responses API

Large language models (LLMs) understand and generate text from prompts. OpenAI exposes models through the Responses API . The official openai npm package is the practical way to call it from Node.js. This post covers common patterns beyond a single prompt string. Prerequisites OpenAI account Generated API key Enabled billing Node.js version 26 openai package installed ( npm i openai ) For Markdown output: marked , dompurify , and jsdom ( npm i marked dompurify jsdom ) Client setup Create a client with your API key (read from the environment in production). import OpenAI from ' openai ' ; const client = new OpenAI ({ apiKey : process . env . OPENAI_API_KEY }); The same SDK can target other hosts that implement a compatible API by setting baseURL and apiKey : const client = new OpenAI ({ apiKey : process . env . LLM_API_KEY , baseURL : ' https://your-gateway.example/v1 ' , }); Azure OpenAI uses AzureOpenAI instead. Many third-party gateways support Chat Completions only; the examples below use client.responses.* , so confirm your provider supports the Responses API (especially for tools like web search). Basic integration Pass a string as input and read output_text from the response. const response = await client . responses . create ({ model : ' gpt-5.5 ' , input : ' Write a one-sentence bedtime story about a unicorn. ' , }); console . log ( response . output_text ); System prompt Use top-level instructions for stable behavior (tone, format, role). They take precedence over casual wording in the user message. const response = await client . responses . create ({ model : ' gpt-5.5 ' , instructions : ' Reply in one short sentence. Use plain language. ' , input : ' Explain what an LLM is. ' , }); console . log ( response . output_text ); Few-shot prompting Pass prior turns as an input array with user and assistant roles, then the new user message. Keep task rules in instructions . const response = await client . responses . create ({ model : ' gpt-5.5 ' , instructions :

2026-06-01 原文 →
AI 资讯

Novelty by AI ที่มา Disproved Erdős Planar Unit Distance Problem

AI จะครองโลก เป็นคำที่ได้ยินมานาน เท่าที่ผู้เขียนจำความได้ก็มี Judgement Day ยุคหนัง Terminator แต่หากจะจริงจังขนาดโยงเข้าความเป็นจริงก็ยังไม่มีอะไรชัดเจน แต่วันนี้เรามีหลักฐานพิสูจน์ได้จริงแล้ว ด้วยความ Novelty จาก OpenAI ที่สามารถค้นพบความรู้ใหม่ที่ไม่เคยมีมนุษย์ค้นพบมาก่อน หักล้างความเชื่อที่ว่า AI ทำได้เพียงนำสิ่งที่มนุษย์ค้นพบแล้วมาเรียงต่อกัน ในเดือนพฤษภาคม 2026 reasoning model ภายในของ OpenAI ได้ disprove Erdős Planar Unit Distance Problem ซึ่งเป็นปัญหาและข้อคาดการณ์ทาง Combinatorial geometry ที่ Paul Erdős ตั้งไว้ตั้งแต่ปี 1946 โจทย์ระบุว่า เมื่อวางจุด nn n จุดบนระนาบ จำนวนของคู่จุดที่ห่างกันพอดี 1 หน่วยจะมีได้มากที่สุดเท่าใด Erdős แสดงความเป็นไปได้ผ่านการจัดเรียงแบบ grid ว่าได้จำนวนคู่ที่เติบโตเหนือเส้นตรงเพียงเล็กน้อย และตั้งข้อคาดการณ์ว่าไม่มีโครงสร้างใดทำได้ดีกว่านี้อย่างมีนัยสำคัญ ข้อคาดการณ์นี้ได้รับการยอมรับในวงกว้างตลอด 80 ปีที่ผ่านมา และยังไม่มีข้อคาดการณ์ที่ดีกว่านี้ จนกระทั่ง OpenAI ได้เผยแพร่ Chain of Thought (CoT) เรียบเรียงความยาว 125 หน้า ซึ่งบันทึกลำดับการให้เหตุผลของโมเดลไว้ทั้งกระบวนการว่าโมเดลไปถึงคำตอบอย่างไร กรอบของคำตอบ: lower bound กับ upper bound ก่อนเข้ากระบวนการทำงานของโมเดล ขออธิบาย "กรอบ" ของคำตอบของปัญหานี้ก่อน เพราะคำตอบถูกล้อมไว้ด้วย lower bound จำนวนที่สร้างได้จริงแล้ว อย่างน้อยเท่านี้ และ upper bound เพดานที่พิสูจน์แล้วว่าเกินไม่ได้ ด้าน lower bound นั้น Erdős เอง (1946) ใช้การจัดเรียงแบบ grid แสดงว่าสร้างได้ถึง n1+Ω(1/log⁡log⁡n)n^{1+\Omega(1/\log\log n)} n 1 + Ω ( 1/ l o g l o g n ) ซึ่งมากกว่าเส้นตรงเพียงเล็กน้อย และเข้าใกล้ศูนย์เมื่อ nn n ใหญ่ขึ้น ส่วนด้าน upper bound นั้น Erdős พิสูจน์เพดานแรกไว้ที่ O(n3/2)O(n^{3/2}) O ( n 3/2 ) จากวงกลมหนึ่งหน่วยสองวงตัดกันได้ไม่เกินสองจุด โดยต่อมา Spencer–Szemerédi–Trotter (1984) บีบเพดานนี้ลงมาเป็น O(n4/3)O(n^{4/3}) O ( n 4/3 ) ซึ่งเป็น upper bound ที่ดีที่สุดจนถึงปัจจุบัน และยังคงอยู่หลังการค้นพบของ OpenAI model วิธีเก่าของ Erdős: วงกลมรัศมีเลือกมาลากผ่านจุด grid หลายจุดพร้อมกัน ทำให้ระยะซ้ำมีมาก สิ่งที่ Erdős คาดการณ์คือ คำตอบจริงของ Planar Unit Distance Problem ควรอยู่ชิดด้าน lower

2026-06-01 原文 →
AI 资讯

OpenAI’s Frontier Governance Framework: Risk Tiers, Trusted Access, and What Developers Need to Know

On May 29, 2026, OpenAI published its Frontier Governance Framework — and most developers moved on to the next item in their feed. That’s a mistake worth correcting. The document doesn’t announce a new model or lower an API price. It describes how OpenAI measures whether its own systems could enable mass-casualty events, what access controls gate who can reach those capabilities, and how this maps to the regulations — the EU AI Act and California’s Transparency in Frontier AI Act — that are actively shaping compliance requirements for any enterprise deploying frontier AI this year. If you build security tools on OpenAI APIs, the framework’s Trusted Access for Cyber program directly affects what your application can and cannot do. If you operate in a regulated environment, the framework is the vendor-side accountability document your compliance team needs to reference. And if you build on frontier models at all, the risk tier system in this framework governs the capability restrictions you will encounter — and, increasingly, what auditors and procurement teams will ask about when vetting your AI vendor stack. What the Framework Actually Is The Frontier Governance Framework is OpenAI’s published methodology for evaluating the risk profile of frontier models before and after deployment. It covers six functional areas: risk assessment and mitigation, model reporting, security risk management, incident response, external expert input, and framework updates. Each area has defined processes, thresholds, and accountability mechanisms. The core architecture is a tier system applied across four risk domains. Each domain is evaluated independently, with tiers reflecting capability levels that could enable specific categories of harm. A model’s rating in any domain determines what deployment controls apply — what gets blocked at the API layer, who gets elevated access, and what triggers an incident response workflow. The framework was published explicitly to align with two regu

2026-05-30 原文 →