Skip to content

[EDU-6497] Edge AI Starter Kit guide #1660

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
May 19, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
---
title: How to deploy the Edge AI Starter Kit template
description: The Edge AI Starter Kit template allows you to create an AI-powered edge application running OpenAI-compatible APIs directly on Azion's distributed network.
meta_tags: templates, guides, Azion Marketplace, AI, Edge Function, Edge Application
namespace: docs_guides_edge_ai_starter_kit
permalink: /documentation/products/guides/edge-ai-starter-kit/
---

import Tag from 'primevue/tag';

<Tag severity="info" client:only="vue">
Preview
</Tag>

The **Edge AI Starter Kit** template contains the configurations for creating an AI-powered edge application that runs OpenAI-compatible APIs directly on Azion's distributed network. This template simplifies the deployment of AI models at the edge, eliminating origin dependencies and allowing you to quickly launch intelligent applications.

The deployment of this template creates an edge application with an edge function and a domain to facilitate your access and management through Azion Web Platform.

---

## Requirements

- This template uses [Application Accelerator](/en/documentation/products/build/edge-application/application-accelerator/), [Edge Functions](/en/documentation/products/build/edge-application/edge-functions/), and [Edge AI](/en/documentation/products/ai/edge-ai/), and it may generate usage-related costs. Check the [pricing page](https://www.azion.com/en/pricing/) for more information.

---

## Deploying the template

You can obtain and configure your template through the Azion Console. To easily deploy it at the edge, click the button below.

<LinkButton
label="Deploy"
link="https://console.azion.com/create/starter-kit-edge-ai"
icon="ai ai-azion"
icon-pos="left"
/>

---

## Setting up the template

In the configuration form, you must provide the information to configure your application. Fill in the presented fields.

Fields identified with an asterisk are mandatory.

1. Define a name for your edge application.
- The bucket for storage and the edge function will use the same name.
- Use a unique and easy-to-remember name. If the name has already been used, the platform returns an error message.
2. Click the **Deploy** button to start the deployment process.

During the deployment, you'll be able to follow the process through a window showing the logs. When it's complete, the page shows information about the application and some options to continue your journey.

:::note
The link to the edge application allows you to see it on the browser. However, it takes a certain time to propagate and configure the application in Azion's edge locations. It may be necessary to wait a few minutes for the URL to be activated and for the application page to be effectively displayed in the browser.
:::

---

## Managing the template

Considering that this initial setup may not be optimal for your specific edge application, all settings can be customized any time you need by using Azion's platform.

### Updating the edge function

This template includes an AI-enabled edge function that is ready to run. This function receives a POST request to the desired AI model and returns the response.

```ts
const modelResponse = await Azion.AI.run("ista-daslab-gemma-3-27b-it-gptq-4b-128g", {
"stream": true,
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Name the european capitals"
}
]
})
return modelResponse
```

This example uses the [Gemma3 model](/en/documentation/products/ai/edge-ai/models/gemma-3/). You can change the model and the request parameters according to your preferences. Check the [AI models reference](/en/documentation/products/ai/edge-ai/models/) for more information about the available models and how to use them in your application.

Follow these steps to update the edge function according to your needs:

1. [Access Azion Console](https://console.azion.com).
2. On the upper-left corner, select **Products menu**, the icon with three horizontal lines, > **Edge Functions**.
3. Find the edge function related to your template and select it. It'll have the same name as your edge application.
- The list is organized alphabetically. You can also use the **search bar** located in the upper-left corner of the list; currently, it filters only by **Function Name**.
4. On the edge function page, use the tabs to configure your function.
- On the **Main Settings** page, you can rename the function and change some basic settings.
- On the **Code** tab, you can update the function's code.
- On the **Arguments** tab, you can define the arguments used by the function.
5. Click the **Save** button to save your changes.

:::tip
Read the documentation about [managing edge functions](/en/documentation/products/build/edge-application/edge-functions/) for more details.
:::

### Managing the edge application

To manage and edit your edge application's settings, follow these steps:

1. [Access Azion Console](https://console.azion.com).
2. On the upper-left corner, select **Products menu**, the icon with three horizontal lines, > **Edge Application**.
- You'll be redirected to the **Edge Application** page. It lists all the edge applications you've created.
3. Find the edge application related to your template and select it.
- The list is organized alphabetically. You can also use the **search bar** located in the upper-left corner of the list; currently, it filters only by **Application Name**.
After selecting the edge application you'll work on, you'll be directed to a page containing all the settings you can configure.

:::tip
Read the documentation about [managing edge applications](/en/documentation/products/build/edge-application/first-steps/) for more details.
:::

### Adding a custom domain

The edge application created during the deployment has an assigned Azion domain to make it accessible through the browser. The domain has the following format: `xxxxxxxxxx.map.azionedge.net/`. However, you can add a custom domain for users to access your edge application through it.

import LinkButton from 'azion-webkit/linkbutton';

<LinkButton link="/en/documentation/products/guides/configure-a-domain/" label="Go to configuring a domain guide" severity="secondary" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
---
title: Como implantar o template Edge AI Starter Kit
description: O template Edge AI Starter Kit permite criar uma edge application com APIs compatíveis com OpenAI, funcionando diretamente na rede distribuída da Azion.
meta_tags: templates, guias, Azion Marketplace, AI, Edge Function, Edge Application
namespace: docs_guides_edge_ai_starter_kit
permalink: /documentacao/produtos/guias/edge-ai-starter-kit/
---

import Tag from 'primevue/tag';

<Tag severity="info" client:only="vue">
Preview
</Tag>

O template **Edge AI Starter Kit** contém as configurações para criar uma edge application com APIs compatíveis com OpenAI, funcionando diretamente na rede distribuída da Azion. Este template simplifica o processo de implementação de modelos de AI na edge, eliminando dependências de origem e permitindo que você desenvolva aplicações inteligentes com rapidez.

A implementação deste template cria uma edge application com uma edge function e um domínio para facilitar seu acesso e gerenciamento através da Azion Web Platform.

---

## Requisitos

- O template usa [Application Accelerator](/pt-br/documentacao/produtos/build/edge-application/application-accelerator/), [Edge Functions](/pt-br/documentacao/produtos/build/edge-application/edge-functions/) e [Edge AI](/pt-br/documentacao/produtos/ai/edge-ai/). Isso pode gerar custos relacionados ao uso. Consulte a [página de preços](/pt-br/documentacao/produtos/precos/) para mais informações.

---

## Implante o template

Você pode obter e configurar seu template através do Azion Console. Para implantar facilmente no edge, clique no botão abaixo.

<LinkButton
label="Implementar"
link="https://console.azion.com/create/starter-kit-edge-ai"
icon="ai ai-azion"
icon-pos="left"
/>

---

## Configure o template

No formulário de configuração, você deve fornecer as informações para personalizar sua aplicação. Preencha os campos apresentados.

Os campos identificados com um asterisco são obrigatórios.

1. Defina um nome para sua edge application.
- O bucket para armazenamento e a edge function usarão o mesmo nome.
- Use um nome único e fácil de lembrar. Se o nome já tiver sido usado, a plataforma retornará uma mensagem de erro.
2. Clique no botão **Deploy** para iniciar o processo de implantação.

Durante a implantação, você poderá acompanhar o processo através de uma janela que mostra os logs. Quando estiver completo, a página mostra informações sobre a aplicação e algumas opções para continuar sua jornada.

:::note
O link para a edge application permite que você a veja no navegador. No entanto, leva um certo tempo para propagar e configurar a aplicação nas edge locations da Azion. Pode ser necessário esperar alguns minutos para que a URL seja ativada e para que a página da aplicação seja efetivamente exibida no navegador.
:::

---

## Gerencie o template

Considerando que essa configuração inicial pode não ser ótima para sua edge application específica, todas as configurações podem ser personalizadas a qualquer momento que você precise, usando a plataforma da Azion.

### Atualize a edge function

Este template inclui uma edge function simples de `Hello World` pronta para ser executada. Essa função recebe uma requisição POST para o modelo de AI desejado e retorna a resposta.

```ts
const modelResponse = await Azion.AI.run("ista-daslab-gemma-3-27b-it-gptq-4b-128g", {
"stream": true,
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Name the european capitals"
}
]
})
return modelResponse
```

Este exemplo usa o [modelo Gemma3](/pt-br/documentacao/produtos/ai/edge-ai/modelos/gemma-3/). Você pode alterar o modelo e os parâmetros da requisição de acordo com suas preferências. Verifique a [referência de modelos de AI](/pt-br/documentacao/produtos/ai/edge-ai/modelos/) para obter mais informações sobre os modelos disponíveis e como usá-los em sua aplicação.

Siga esses passos para atualizar a edge function de acordo com suas necessidades:

1. [Acesse o Azion Console](https://console.azion.com).
2. No canto superior esquerdo, selecione **Products menu**, o ícone de três linhas horizontais, > **Edge Functions**.
3. Encontre a edge function relacionada ao seu template e selecione-a. Ela terá o mesmo nome da sua edge application.
- A lista está organizada alfabeticamente. Você também pode usar a **barra de busca** localizada no canto superior esquerdo da lista; atualmente, ela filtra apenas pelo campo **Function Name**.
4. Na página da edge function, use as abas para configurar sua função.
- Na aba **Main Settings**, você pode renomear a função e alterar algumas configurações básicas.
- Na aba **Code**, você pode atualizar o código da função.
- Na aba **Arguments**, você pode definir os argumentos usados pela função.
5. Clique no botão **Save** para salvar suas alterações.

:::tip
Leia a documentação sobre [gerenciamento de edge functions](/pt-br/documentacao/produtos/build/edge-application/edge-functions/) para mais detalhes.
:::

### Gerencie a edge application

Para gerenciar e editar as configurações da sua edge application, siga esses passos:

1. [Acesse o Azion Console](https://console.azion.com).
2. No canto superior esquerdo, selecione **Products Menu**, o ícone de três linhas horizontais, > **Edge Application**.
- Você será redirecionado para a página **Edge Application**. Ela lista todas as edge applications que você criou.
3. Encontre a edge application relacionada ao seu template e selecione-a.
- A lista está organizada alfabeticamente. Você também pode usar a **barra de busca** localizada no canto superior esquerdo da lista; atualmente, ela filtra apenas pelo campo **Application Name**.

Depois de selecionar a edge application que você trabalhará, você será direcionado para uma página contendo todas as configurações que você pode ajustar.

:::tip
Leia a documentação sobre [gerenciamento de edge application](/pt-br/documentacao/produtos/build/edge-application/primeiros-passos/) para mais detalhes.
:::

### Adicione um domínio personalizado

A edge application criada durante a implantação tem um domínio Azion atribuído para torná-la acessível através do navegador. O domínio tem o seguinte formato: `xxxxxxxxxx.map.azionedge.net/`. No entanto, você pode adicionar um domínio personalizado para que os usuários acessem sua edge application através dele.

import LinkButton from 'azion-webkit/linkbutton';

<LinkButton link="/pt-br/documentacao/produtos/guias/configurar-dominio/" label="Ir para o guia de configuração de domínio" severity="secondary" />