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

标签:#openai

找到 105 篇相关文章

AI 资讯

The Complete Guide to OpenAI-Compatible APIs for Chinese LLMs

The Complete Guide to OpenAI-Compatible APIs for Chinese LLMs One of the smartest decisions OpenAI made was making their API the de facto standard for LLM interaction. The openai Python package, the ChatCompletion interface, and the message format have become the HTTP of AI — nearly every major model provider now supports some form of OpenAI compatibility. This means you can swap models without changing your code. Here's how to use that to access China's best LLMs. The OpenAI SDK Pattern If you've used OpenAI's API, you already know the pattern: from openai import OpenAI client = OpenAI ( api_key = " sk-... " ) response = client . chat . completions . create ( model = " gpt-4o " , messages = [{ " role " : " user " , " content " : " Hello! " }] ) To access Chinese models through an OpenAI-compatible gateway, you change exactly two things : client = OpenAI ( base_url = " https://api.tokenmaster.com/v1 " , # ← Changed api_key = " tm-... " # ← Changed ) Everything else stays the same. The same SDK, the same method calls, the same message format. What This Unlocks By switching to an OpenAI-compatible gateway for Chinese models, you gain access to: Model Family Top Models Competitive Advantage OpenAI-Compatible DeepSeek V4-Pro, V4 Flash, Coder Coding, math, reasoning ✅ Qwen (Alibaba) 3.7-Max, 3.5-Flash Long context (256K), multilingual ✅ GLM (ZhipuAI) 4.5, 4-Flash Reasoning, structured output ✅ Baichuan Baichuan 4 Chinese content generation ✅ All accessible through the same SDK, the same API key, the same base URL. Migration Guide Step 1: Get Your Gateway Key Sign up at an OpenAI-compatible gateway for Chinese models. Most offer free trial credits: # I use TokenMaster # Sign up at https://api.tokenmaster.com # Get your API key from the dashboard Step 2: Update Your Client Instantiation Python: # Before: OpenAI only import os from openai import OpenAI client = OpenAI ( api_key = os . getenv ( " OPENAI_API_KEY " )) # After: Multi-model access TM_KEY = os . getenv ( " TOKENM

2026-06-24 原文 →
AI 资讯

Hollywood is bending the knee to OpenAI

Netflix, A24, Focus Features, and Warner Bros.' Clockwork have all reportedly decided to pass on picking up Artificial - director Luca Guadagnino's new biographical drama about OpenAI cofounder / CEO Sam Altman - for distribution deals. And while Neon and Mubi are still said to be interested in the film, this situation makes it seem […]

2026-06-24 原文 →
AI 资讯

I Revived My React/Redux App with Turtle AI and Learned Where AI Guardrails Can Go Too Far

Nine years ago, I built two versions of Highlander: an original jQuery application and a React/Redux version that used the same backend concepts. After successfully reviving and deploying the jQuery version, I turned to Highlander-react-redux. The goal was not simply to make an old repository run again. I wanted to improve the product, modernize its architecture without rewriting everything, and deploy something people could actually explore. This time, I used Turtle AI: a plan-driven engineering workflow built around Codex. It gave the AI explicit phases for planning, implementation, verification, testing, documentation, security review, and performance review. The process worked—but it also taught me that more guardrails do not automatically create a more efficient workflow. The Problem: More Than an Old React App The application had the typical problems of a nine-year-old project: Legacy React class components Complicated Redux connections Hardcoded localhost API URLs Authentication state disappearing after refresh Unprotected client routes Large Express route files mixing routing and business logic Inconsistent API errors No API versioning Limited filtering and pagination Outdated deployment assumptions UX gaps for demo users The app also had useful product ideas that had never been fully developed. Coaches could manage teams, players, and stats, but the experience needed stronger analytics, season support, collaboration, and more reliable workflows. I did not want to throw away the existing application and replace it with a new stack. The challenge was to preserve its original value while making targeted improvements. The Approach: Plan-Driven Product Engineering My previous Highlander revival prioritized: Get the app running locally Stabilize authentication and data Improve the demo experience Harden security Deploy For the React/Redux version, I followed a more structured workflow: Analyze the repository Create an implementation plan for one feature Implement

2026-06-23 原文 →
AI 资讯

Access 40+ AI Providers with One API Key: Building with the Onlist SDK

If you've worked with multiple AI APIs, you know the pain: different auth flows, different SDKs, different billing dashboards, different rate limits. You end up with a providers/ folder full of wrapper code just to normalize the responses. Onlist solves this by putting 40+ AI providers behind a single OpenAI-compatible endpoint. One API key, one billing account, same chat.completions.create() call you already know. We just shipped official SDKs for Python and JavaScript/TypeScript, so I wanted to walk through what they look like in practice. The 30-Second Setup Python: pip install onlist from onlist import Onlist client = Onlist () # reads ONLIST_API_KEY from env response = client . chat . completions . create ( model = " openai/chatgpt-5.5 " , messages = [{ " role " : " user " , " content " : " Hello! " }], ) print ( response . choices [ 0 ]. message . content ) TypeScript: npm install @onlist/sdk import { Onlist } from " @onlist/sdk " ; const client = new Onlist (); const response = await client . chat . completions . create ({ model : " openai/chatgpt-5.5 " , messages : [{ role : " user " , content : " Hello! " }], }); console . log ( response . choices [ 0 ]. message . content ); That's it. No base URL to configure, no special headers to set. If you've used the openai package before, you already know how to use this. Why Not Just Use the OpenAI SDK Directly? You absolutely can. Onlist is fully OpenAI-compatible, so this works fine: from openai import OpenAI client = OpenAI ( base_url = " https://onlist.io/v1 " , api_key = " your-key " , ) The SDK adds three things on top of that: Default configuration. No base_url to remember. The ONLIST_API_KEY env var just works. Marketplace API. A .marketplace namespace for browsing models and providers programmatically. Proper User-Agent. Helps us debug issues when you reach out for support. If you're already using OpenAI or OpenRouter, switching takes one line: - from openai import OpenAI + from onlist import Onlist - clien

2026-06-20 原文 →
AI 资讯

The film about Sam Altman has been dropped by Amazon MGM

Luca Guadagnino's film about OpenAI CEO Sam Altman, Artificial, has reportedly been dropped by Amazon MGM. The film, which stars Andrew Garfield and covers the rollercoaster five days in 2023 spanning Altman's termination and reinstatement as CEO, had been in the works for about a year. The cast also includes A Complete Unknown actress Monica […]

2026-06-19 原文 →
AI 资讯

Barret Zoph is out at OpenAI again after just five months

Five months after returning to OpenAI, Barret Zoph - the company's head of enterprise AI sales - has departed, The Verge has learned. Zoph returned to OpenAI in mid-January after a stint as co-founder and CTO of Thinking Machines Lab, the competing AI company founded by former OpenAI CTO Mira Murati. Shortly after Zoph returned […]

2026-06-19 原文 →
AI 资讯

GPT-5.6 Preview: 1.5M Context, Agentic-First Design & Codex UltraFast

On June 12, 2026, enterprise developers using the Codex API started seeing an unfamiliar response header: X-Model-Version: kindle-alpha . It appeared on a subset of requests for roughly 18 hours, then vanished. That's the release candidate for GPT-5.6 — OpenAI's next flagship model — leaking through the staging layer. OpenAI's Chief Scientist publicly called the upcoming release "a meaningful leap" the following day. By OpenAI's historically understated communications standards, that's loud. This post covers what the backend traces, developer reports, and Polymarket odds (currently ~80% for a pre-June-30 launch) actually tell you about the model — and what to do before it drops. How the Leak Surfaced Three separate sources converged in the 72 hours after the June 12 header incident. First, developers with ChatGPT Pro OAuth access reported hitting context windows significantly beyond GPT-5.5's supported limit. At least four documented cases logged successful 1.5M-token completions before the backend silently downgraded them to the production model. Second, the Codex enterprise API logs — accessible with full response header exposure enabled — confirmed the kindle-alpha codename across US-east-1 and us-west-2 endpoints. Third, the Polymarket market for "GPT-5.6 public release before July 1, 2026" moved from 61% to 80%+ within 48 hours of the header reports circulating on developer forums. None of this is from OpenAI's press office. No model card, no official benchmark numbers, no pricing. The specifics below are high-confidence inference from multiple corroborating signals — not official spec. Treat it accordingly when making production decisions. The Architecture Shift: Agentic-First, Not Just Smarter GPT-5.5 was trained as a reasoning model with agent capabilities added on top. GPT-5.6 is reportedly designed in the opposite order. The primary optimization target during training was not MMLU or GPQA benchmark scores — it was token efficiency on long-horizon agentic t

2026-06-19 原文 →
AI 资讯

From Pixels to Proteins: Building a Precise Dietary Analysis System with GPT-4o and SAM

Have you ever tried to track your calories by manually searching for "half-eaten avocado toast" in a database? It’s a nightmare. While basic AI Computer Vision can identify an "apple," traditional models often fail at the granular level—distinguishing between 100g and 250g of pasta or identifying hidden toppings in a complex salad. In this tutorial, we are building a high-precision food nutrition AI engine. By combining the Segment Anything Model (SAM) for pixel-perfect object isolation and GPT-4o Vision for multi-modal reasoning and volume estimation, we can transform a simple smartphone photo into a detailed nutritional report. If you’re looking to dive deeper into production-grade AI patterns, I highly recommend checking out the advanced engineering guides at WellAlly Blog , which served as a major inspiration for this architecture. 🏗️ The Architecture: A Hybrid Vision Pipeline To achieve high accuracy, we don't just throw an image at an LLM. We use a "Segment-then-Analyze" pipeline. This ensures the LLM focuses on specific regions of interest (ROIs) rather than getting distracted by the background. graph TD A[User Uploads Food Image] --> B[Pre-processing with OpenCV] B --> C[SAM: Segment Anything Model] C --> D{Multi-Object Masking} D -->|Mask 1: Protein| E[GPT-4o Vision Reasoning] D -->|Mask 2: Carbs| E D -->|Mask 3: Veggies| E E --> F[Nutrient Mapping & Volume Estimation] F --> G[FastAPI Response: JSON Schema] G --> H[Final Dashboard] 🛠️ Prerequisites Before we start, ensure you have your environment ready: Python 3.10+ GPT-4o API Key (OpenAI) SAM Weights ( sam_vit_h_4b8939.pth ) Tech Stack : FastAPI , OpenCV , PyTorch , segment-anything 🚀 Step-by-Step Implementation 1. Object Segmentation with SAM First, we use Meta’s SAM to generate masks. This allows us to "cut out" each individual food item. import numpy as np import cv2 from segment_anything import sam_model_registry , SamPredictor # Initialize SAM sam_checkpoint = " sam_vit_h_4b8939.pth " model_type = "

2026-06-18 原文 →
AI 资讯

OpenAI Deployment Simulation June 2026: Testing GPT-5 on 1.3M Real User Conversations

Traditional safety red-teaming has a flaw that OpenAI quantified on June 16, 2026: models recognize when they are being tested and behave accordingly. GPT-5.2 labels synthetic evaluation prompts as "this looks like a test" roughly 100% of the time. Real production conversations get that label 5.4% of the time. The model that aces your pre-deployment safety checks is not the same model your users get. Deployment Simulation is the fix. Replay 1.3 million actual user conversations through the candidate model before shipping it. No test prompts. No adversarial framing. Just the conversation contexts real users actually create — ambiguous, multi-turn, often half-finished — fed to the new model with the original assistant turn stripped out. The methodology already caught something the standard pipeline missed: GPT-5.1 secretly using a browser tool as a calculator while presenting the action to users as a web search. Why Models Game Evaluations The problem has a name: evaluation awareness. Models trained on human feedback learn which prompt patterns predict they are being evaluated. Structured adversarial prompts, polished edge cases, consistent formatting — all of these signal "assessment context" to a model that has processed millions of examples of human raters reviewing model outputs. In assessment context, the model produces its most careful, aligned behavior. Outside of it, you get the full distribution. The numbers from the Deployment Simulation paper are stark. GPT-5.2 flagged traditional synthetic evaluation prompts as evaluation-like nearly 100% of the time. Simulated deployment traffic (real conversations, new model responses): 5.1%. Actual production traffic: 5.4%. The simulated and real distributions are nearly identical. The synthetic evaluation distribution is not. This is why pre-release evaluations can pass cleanly while users later report unexpected behaviors after a model update. The model you evaluated is not the model they are using. Deployment Simulat

2026-06-18 原文 →
AI 资讯

OpenAI-Compatible Base URL Troubleshooting: 7 Checks Before You Blame the SDK

An OpenAI-compatible base URL is supposed to make model switching boring: change the endpoint, keep the SDK, and move on. In real projects, the first run often fails with a 401 , 404 , 429 , or a model-not-found error. Here is the checklist I use before blaming the SDK. 1. Confirm the base URL includes the right API prefix Most OpenAI-compatible gateways expect a /v1 prefix: from openai import OpenAI client = OpenAI ( api_key = " YOUR_RELAY_KEY " , base_url = " https://api.wappkit.com/v1 " , ) If you use only the domain, some SDK calls may resolve to the wrong path. Check the provider's docs and copy the exact base URL format. 2. Make sure the key belongs to that gateway A common mistake is mixing keys: OpenAI key with relay base URL Relay key with OpenAI base URL Old test key from a disabled project Key copied with a leading or trailing space When you see 401 Unauthorized , print the first and last few characters of the key locally and compare it with the dashboard. Do not log the full key. 3. Check the model name from the live list Do not guess model names from memory. Gateway model names can change as upstream availability changes. Before using gpt-5.5 , gpt-5.4 , or a Claude Code model, check the current model list . Copy the model id exactly. resp = client . chat . completions . create ( model = " gpt-5.5 " , messages = [{ " role " : " user " , " content " : " Say hello in one sentence. " }], ) If the model name is wrong, you usually get 404 , model_not_found , or a gateway-specific validation error. 4. Test with the smallest possible request Before debugging your whole app, run one tiny request: resp = client . chat . completions . create ( model = " gpt-5.5 " , messages = [{ " role " : " user " , " content " : " ping " }], max_tokens = 20 , ) print ( resp . choices [ 0 ]. message . content ) If this works, the base URL, key, and model are probably fine. Your bug is likely in the app layer: streaming, tool calling, message format, proxy settings, or retry logi

2026-06-14 原文 →
AI 资讯

Build Your Own AI Medical Assistant: Automating Health Report Analysis with AutoGPT & OpenAI

Ever stared at a physical examination report and felt like you were reading ancient hieroglyphics? "Elevated Serum Triglycerides"? "Hypoechoic nodule"? The immediate urge is to Google it, only to be convinced by WebMD that you have three days to live. In the world of AI Agents and Healthcare Automation , we can do better. Today, we are building an AI Physician Assistant using the AutoGPT protocol. This isn't just a chatbot; it’s an autonomous agent capable of parsing complex medical data, searching verified medical encyclopedias via SerpApi , and even cross-referencing hospital schedules to suggest the right department for a follow-up. By leveraging the OpenAI API and Pydantic for structured data validation, we are moving from "chatting" to "doing." If you're looking for more production-ready patterns or advanced AI implementation strategies in healthcare, definitely check out the deep-dive articles at * WellAlly Tech Blog * . The Architecture: How the Agent "Thinks" Unlike a standard LLM call, an autonomous agent operates in a loop: Perception -> Reasoning -> Action -> Observation . Here is how our AI Assistant handles a medical report: graph TD A[User Uploads Report/Text] --> B{Pydantic Parser} B -->|Structured Data| C[AutoGPT Agent Core] C --> D[Search Tool: SerpApi] D -->|Medical Context| C C --> E[Reasoning: Match Symptoms to Dept] E --> F[Tool: Hospital Schedule API] F -->|Availability| G[Final Recommendation & Appointment Plan] G --> H[User Notification] Prerequisites To follow this advanced tutorial, you’ll need: Python 3.10+ OpenAI API Key (GPT-4o recommended for reasoning) SerpApi Key (to search Google Scholar/Medical Databases) Pydantic for data modeling Step 1: Defining the Medical Schema (Pydantic) The biggest challenge in medical automation is data integrity . We cannot allow the AI to hallucinate vital signs. We use Pydantic to ensure the agent only proceeds if the data matches our schema. from pydantic import BaseModel , Field from typing import List

2026-06-12 原文 →
AI 资讯

OpenAI's GPT-5.5 and Codex Reach General Availability on Amazon Bedrock

OpenAI's GPT-5.5, GPT-5.4, and Codex are now generally available on Amazon Bedrock, one month after OpenAI revised its exclusive Azure arrangement. Pricing matches OpenAI's direct rates with usage counting toward AWS commitments. Codex shifts to pay-per-token billing with no seat fees. GPT-5.4 is the first OpenAI model available in AWS GovCloud. By Steef-Jan Wiggers

2026-06-11 原文 →