Window

Use your own AI models on the web

In this example, a simple chat bot is implemented in one file, with no backend. Using the Chrome Extension ⚠️, you can choose which model to use with apps built on window.ai

js

// Get the active model from the window.ai API 
await window.ai.getCurrentModel()

// Get completions from the window.ai API
await window.ai.getCompletion(
  {
    messages: [...last10messages],
  },
  {
    onStreamResult: (result: any, error: any) => {
      console.log(result.message.content)
    },
  })

AI

Hi! I am a friendly AI assistant. Ask me anything!

Type a message to start the conversation

You control your AI

The Window extension allows you to configure the models you use on the web. You can choose from OpenAI, Together, Cohere, or even an AI running on your computer if you need privacy.

configure
history

Save your history

The Window extension keeps a history of all the messages you send and receive. You can use this history to train your own AI models.

Learn more

Read the announcement