Creating Games Using Free Claude3.5 with Artifacts

Anthropic has quietly released the Claude 3.5 model, which not only improves model performance but also supports Artifacts. After initial experience, I feel this is what the future of AI should look like, even more impressive than the previous GPT4-o.

Coding in the Artifacts workspace

Before Artifacts, if you wanted to use ChatGPT or other LLMs to help implement program functionality, you needed to first provide the functional requirements, then copy the AI’s code into your own environment to run. If it didn’t meet expectations, you had to ask again, modify the code, and run it again. This process needed to be repeated until satisfaction or giving up (some complex code is still not well written by AI currently).

Read More

How an Async Thread Pool Exception Caused Service Chaos

Recently, I encountered a very strange service restart issue in our business, and the troubleshooting process was quite complex. This article will review the process. The problem involves multiple aspects such as C++ thread pools, integer overflow, exception catching, and blocking, which is quite interesting.

Next, I will organize the content of this article according to the problem investigation process, starting with an introduction to the problem background, then listing the initial troubleshooting ideas and methods for locating abnormal requests. Then, through code analysis and some simple use cases to reproduce the problem, we will unveil the mystery of the service restart.

Read More

Understand Web Stream Output Implementation with Examples

If you’ve used large language models like ChatGPT, you may have noticed that the AI’s output text appears in “bursts” during chat conversations. This is known as stream output. How is this effect achieved in the browser?

This article will introduce 4 common methods to implement stream output effects, each demonstrated with practical examples. The choice of method in business applications depends on specific requirements and scenarios.

  1. Client-side polling: The client sends requests to the backend service at regular intervals (e.g., every few seconds) to retrieve new data.
  2. Chunked transfer: Supported by HTTP/1.1, the server can send only part of the response content at a time, and the client can start processing as soon as it receives partial data.
  3. Server-Sent Events: The server pushes information to the browser. The browser creates a one-way connection to the server, through which the server can send multiple messages.
  4. WebSocket: Establishes a persistent, full-duplex connection, allowing real-time, two-way communication between the server and client.

Read More