Skip to content

OpenAI's Canvas can translate code between languages ​​with one click

    Coding shortcuts in Canvas include reviewing code, adding debug logs, inserting comments, fixing bugs, and porting code to different programming languages. For example, if your code is JavaScript, it can become PHP, TypeScript, Python, C++ or Java in just a few clicks. As with GPT-4o on its own, you will probably still need to check it for errors.

    A screenshot of coding with ChatGPT with Canvas, captured on October 4, 2024.

    A screenshot of coding with ChatGPT with Canvas, captured on October 4, 2024.

    Credit: Benj Edwards

    A screenshot of coding with ChatGPT with Canvas, captured on October 4, 2024.


    Credit: Benj Edwards

    Also, users can highlight specific sections to direct ChatGPT's focus, and the AI ​​model can provide inline feedback and suggestions while considering the entire project, much like a copy editor or code reviewer. And the interface makes it easy to restore previous versions of a working document using a back button in the Canvas interface.

    A new AI model

    OpenAI says its research team has developed new core behaviors for GPT-4o to support Canvas, including activating the canvas for appropriate tasks, generating certain content types, making targeted edits, rewriting documents, and providing inline critiques .

    An image of OpenAI's Canvas in action.

    An image of OpenAI's Canvas in action.

    An image of OpenAI's Canvas in action.


    Credit: OpenAI

    A key development challenge, according to OpenAI, was determining when to activate a canvas. In an example on the Canvas blog post, the team says it taught the model to open a canvas for prompts like “Write a blog post about the history of coffee beans,” while not firing Canvas for general question and answer tasks like “Help me to cook a new one'. recipe for dinner.”

    Another challenge was tuning the model's editing behavior once the canvas was activated, specifically the choice between targeted edits and complete rewrites. The team trained the model to perform targeted edits when users specifically select text through the interface, and otherwise prefer rewriting.

    The company noted that canvas is the first major update to ChatGPT's visual interface since its launch two years ago. Although Canvas is still in early beta, OpenAI plans to improve its capabilities over time based on user feedback.