puter/src/puter-js
2024-08-25 14:38:19 -07:00
..
src Show an error if file containing puter.js is loaded using the file: protocol 2024-08-25 14:38:19 -07:00
test remove duplicate and/or incorrect license headers 2024-07-09 13:50:20 -07:00
.gitignore refactor: move puter gui to workspace 2024-07-07 17:12:55 -04:00
APACHE_LICENSE.txt refactor: move puter gui to workspace 2024-07-07 17:12:55 -04:00
package-lock.json refactor: move puter gui to workspace 2024-07-07 17:12:55 -04:00
package.json fix: remove flag that breaks puter-js webpack 2024-07-10 17:18:54 -04:00
README.md refactor: move puter gui to workspace 2024-07-07 17:12:55 -04:00

Puter.js

The official JavaScript SDK for Puter.com. Cloud and AI features right from your frontend code!

« LIVE DEMO »

Docs · Puter.com · Discord · Reddit · X (Twitter)

Example

Make sure the development server is running.

<html>
<body>
    <script src="http://puter.localhost:4100/sdk/puter.dev.js"></script>
    <script>
        // Loading ...
        puter.print(`Loading...`);

        // Chat with GPT-3.5 Turbo
        puter.ai.chat(`What color was Napoleon's white horse?`).then((response) => {
            puter.print(response);
        });
    </script>
</body>
</html>