You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have instrumented this repository with a _dev container_ that comes with a Python 3 runtime. Simply open the repo in GitHub Codespaces or on your local Docker Desktop, to activate the runtime automatically. Then open th Jupyter notebook and select the Python 3.x kernel to prepare the Notebook for execution.
3
+
We have setup this repository and course with a _dev container_ that comes with a Python 3 runtime. Open the repo in GitHub Codespaces or on your local Docker Desktop, to activate the runtime automatically. Then open th Jupyter notebook and select the Python 3.x kernel to prepare the Notebook for execution.
4
4
5
5
## 1. Create `.env` file
6
6
@@ -10,18 +10,20 @@ To configure this, we need to setup local environment variables for Azure as fol
10
10
11
11
1. Look in the root folder for a `.env.copy` file. It should contain a list of name-value pairs like this:
12
12
13
-
```bash
14
-
AZURE_OPENAI_ENDPOINT='<add your endpoint here>'
15
-
AZURE_OPENAI_DEPLOYMENT='<add your deployment name here>'
16
-
AZURE_OPENAI_KEY='<add your key here>'
17
-
AZURE_OPENAI_EMBEDDINGS_DEPLOYMENT='<add your deployment name here>'
18
-
```
13
+
```bash
14
+
AZURE_OPENAI_ENDPOINT='<add your endpoint here>'
15
+
AZURE_OPENAI_DEPLOYMENT='<add your deployment name here>'
16
+
AZURE_OPENAI_KEY='<add your key here>'
17
+
AZURE_OPENAI_EMBEDDINGS_DEPLOYMENT='<add your deployment name here>'
18
+
```
19
19
20
20
2. Make a copy of that file called `.env` using a command like this at the terminal:
21
-
```bash
22
-
cp .env.copy .env
23
-
```
24
-
This should create an identical copy _except that this file is .gitignore-d and will never get checked into source control_. We can now populate **this .env file** with the environment variable values (secrets) without fear of them being checked in accidentally. You can now move to the next section to start populating these variables.
21
+
22
+
```bash
23
+
cp .env.copy .env
24
+
```
25
+
26
+
This should create an identical copy _except that this file is .gitignore-d and will never get checked into source control_. We can now populate **this .env file** with the environment variable values (secrets) without fear of them being checked in accidentally. You can now move to the next section to start populating these variables.
25
27
26
28
3. (Option) If you use GitHub Codespaces, you have the option to save environment variables as _Codespaces secrets_ associated with this repository. In that case, you won't need to setup a local .env file. **However, note that this option works only if you use GitHub Codespaces.** You will still need to setup the .env file if you use Docker Desktop instead.
27
29
@@ -31,35 +33,35 @@ The above steps should be executed also if you are using the non-Azure OpenAI en
31
33
OPENAI_API_KEY='<add your OpenAI key here>'
32
34
```
33
35
34
-
35
36
## 2. Populate `.env` file
36
37
37
38
Let's take a quick look at the variable names to understand what they represent:
38
39
39
-
| Variable | Description |
40
-
|:---|:---|
41
-
|AZURE_OPENAI_ENDPOINT| This is the deployed endpoint for an Azure OpenAI resource|
42
-
|AZURE_OPENAI_KEY | This is the authorization key for using that service |
43
-
|OPENAI_API_KEY | This is the authorization key for using the service for non-Azure OpenAI endpoints |
44
-
|AZURE_OPENAI_DEPLOYMENT| This is the _text generation_ model deployment endpoint |
45
-
|AZURE_OPENAI_EMBEDDINGS_DEPLOYMENT | This is the _text embeddings_ model deployment endpoint |
|AZURE_OPENAI_ENDPOINT| This is the deployed endpoint for an Azure OpenAI resource|
43
+
|AZURE_OPENAI_KEY | This is the authorization key for using that service|
44
+
|OPENAI_API_KEY| This is the authorization key for using the service for non-Azure OpenAI endpoints |
45
+
|AZURE_OPENAI_DEPLOYMENT| This is the _text generation_ model deployment endpoint|
46
+
|AZURE_OPENAI_EMBEDDINGS_DEPLOYMENT | This is the _text embeddings_ model deployment endpoint|
47
+
|||
47
48
48
49
For context, the last two variables refer to specific models that are used in chat completion (text generation model) and vector search (embeddings model) activities that are frequently used in generative AI applications. In the following sections, we'll locate the _values_ for these variables and set them in `.env` (replacing the content within the `' '`, but preserving the quotes).
49
50
50
51
### 2.1 Use Azure Portal
51
52
52
53
The Azure OpenAI endpoint and key values will be found in the [Azure Portal](https://portal.azure.com?WT.mc_id=academic-105485-koreyst) so let's start there.
53
54
54
-
1. Navigate to the [Azure Portal](https://portal.azure.com?WT.mc_id=academic-105485-koreyst)
55
+
1.Go to the [Azure Portal](https://portal.azure.com?WT.mc_id=academic-105485-koreyst)
55
56
1. Click the **Keys and Endpoint** option in the sidebar (menu at left).
56
57
1. Click **Show Keys** - you should see the following: KEY 1, KEY 2 and Endpoint.
57
58
1. Use the KEY 1 value for AZURE_OPENAI_KEY
58
59
1. Use the Endpoint value for AZURE_OPENAI_ENDPOINT
59
60
60
61
Next, we need the endpoints for the specific models we've deployed.
62
+
61
63
1. Click the **Model deployments** option in the sidebar (left menu) for Azure OpenAI resource.
62
-
1. In the destination page, click **Manage Deployments**
64
+
1. In the destination page, click **Manage Deployments**
63
65
64
66
This will take you to the Azure OpenAI Studio website, where we'll find the other values as described below.
65
67
@@ -74,11 +76,12 @@ This will take you to the Azure OpenAI Studio website, where we'll find the othe
74
76
Now update the environment variables to reflect the _Deployment name_ used. This will typically be the same as the model name unless you changed it explcitly. So, as an example, you might have:
**Don't forget to save the .env file when done**. You can now exit the file and return to the instructions for running the notebook.
82
84
83
85
### 2.3 Use OpenAI Public API
84
-
Your OpenAI API key can be found in your [OpenAI account](https://platform.openai.com/api-keys?WT.mc_id=academic-105485-koreyst). If you don't have one, you can sign up foran account and create an API key. Once you have the key, you can use it to populate the `OPENAI_API_KEY` variablein the `.env` file.
86
+
87
+
Your OpenAI API key can be found in your [OpenAI account](https://platform.openai.com/api-keys?WT.mc_id=academic-105485-koreyst). If you don't have one, you can sign up for an account and create an API key. Once you have the key, you can use it to populate the `OPENAI_API_KEY` variable in the `.env` file.
Copy file name to clipboardExpand all lines: 01-introduction-to-genai/translations/pt-br/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -131,6 +131,6 @@ O que é verdade sobre Grandes Modelos de Linguagem?
131
131
132
132
## Ótimo trabalho! A Jornada Continua
133
133
134
-
Deseja aprender mais sobre diferentes conceitos de IA Generativa? Acesse a [página de Aprendizado Contínuo](../../../13-continued-learning/translations/pt-br/README.md?WT.mc_id=academic-105485-koreyst) para encontrar outros ótimos recursos sobre este tópico.
134
+
Deseja aprender mais sobre diferentes conceitos de IA Generativa? Acesse a [página de Aprendizado Contínuo](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) para encontrar outros ótimos recursos sobre este tópico.
135
135
136
136
Vá para a Lição 2, onde veremos como [Explorar e comparar diferentes tipos de LLM](../../../02-exploring-and-comparing-different-llms/translations/pt-br/README.md?WT.mc_id=academic-105485-koreyst)!
Copy file name to clipboardExpand all lines: 02-exploring-and-comparing-different-llms/translations/pt-br/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -194,6 +194,6 @@ Saiba mais sobre como você pode [usar o RAG](https://learn.microsoft.com/azure/
194
194
195
195
## Ótimo Trabalho, Continue com Seu Aprendizado
196
196
197
-
Deseja aprender mais sobre diferentes conceitos de IA Generativa? Acesse a [página de aprendizado contínuo](../../../13-continued-learning/translations/pt-br/README.md?WT.mc_id=academic-105485-koreyst) para encontrar outros ótimos recursos sobre este tópico.
197
+
Deseja aprender mais sobre diferentes conceitos de IA Generativa? Acesse a [página de aprendizado contínuo](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) para encontrar outros ótimos recursos sobre este tópico.
198
198
199
199
Vamos para a Lição 3, onde veremos como podemos [Criar IA Generativa de forma Responsável](../../../03-using-generative-ai-responsibly/translations/pt-br/README.md?WT.mc_id=academic-105485-koreyst)!
Copy file name to clipboardExpand all lines: 03-using-generative-ai-responsibly/translations/pt-br/README.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Usando a IA Generativa de Forma Responsável
2
2
3
-
[]()
3
+
[]()
4
4
5
5
> **Vídeo em Breve**
6
6
@@ -44,9 +44,9 @@ Vamos dar, por exemplo, a criação de um recurso para nossa startup que permite
44
44
45
45
O modelo produz uma resposta como a que está abaixo:
46
46
47
-
_11zon.webp?WT.mc_id=academic-105485-koreyst)
47
+
_11zon.webp?WT.mc_id=academic-105485-koreyst>)
Esta é uma resposta muito confiante e completa. Infelizmente, está incorreta. Mesmo com uma quantidade mínima de pesquisa, alguém descobriria que houve mais de um sobrevivente do Titanic. Para um estudante que está começando a pesquisar esse tópico, essa resposta pode ser persuasiva o suficiente para não ser questionada e tratada como fato. As consequências disso podem levar ao sistema de IA sendo pouco confiável e impactar negativamente a reputação de nossa startup.
52
52
@@ -96,7 +96,7 @@ Agora é hora de encontrar maneiras de prevenir ou limitar o dano potencial caus
96
96
97
97
-**Metaprompt**: metaprompts e fundamentação são maneiras de direcionar ou limitar o modelo com base em determinados comportamentos e informações. Isso poderia ser o uso de entradas do sistema para definir certos limites do modelo. Além disso, fornecer saídas mais relevantes para o escopo ou domínio do sistema.
98
98
99
-
Também pode ser o uso de técnicas como a Recuperação de Geração Aumentada (RAG) para fazer com que o modelo obtenha informações apenas de uma seleção de fontes confiáveis. Há uma lição posterior neste curso para [criar aplicações de busca](../../../08-building-search-applications/translations/pt-br/README.md?WT.mc_id=academic-105485-koreyst)
99
+
Também pode ser o uso de técnicas como a Recuperação de Geração Aumentada (RAG) para fazer com que o modelo obtenha informações apenas de uma seleção de fontes confiáveis. Há uma lição posterior neste curso para [criar aplicações de busca](../../../08-building-search-applications/translations/pt-br/README.md?WT.mc_id=academic-105485-koreyst)
100
100
101
101
-**Experiência do Usuário**: a camada final é onde o usuário interage diretamente com o modelo por meio da interface de nosso aplicativo de alguma forma. Dessa forma, podemos projetar a UI/UX para limitar o usuário quanto aos tipos de entradas que podem enviar ao modelo, bem como ao texto ou imagens exibidos ao usuário. Ao implantar o aplicativo de IA, também devemos ser transparentes sobre o que nossa aplicação de IA Generativa pode e não pode fazer.
102
102
@@ -110,7 +110,7 @@ Criar uma prática operacional em torno de suas aplicações de IA é a etapa fi
110
110
111
111
## Ferramentas
112
112
113
-
Embora o trabalho de desenvolver soluções de IA Responsável possa parecer muito, porém é um trabalho que vale a pena. À medida que a área de IA Generativa cresce, mais ferramentas para ajudar os desenvolvedores a integrar eficientemente a responsabilidade em seus fluxos de trabalho amadurecerão. Por exemplo, o [Azure AI Content Safety](https://learn.microsoft.com/azure/ai-services/content-safety/overview?WT.mc_id=academic-105485-koreyst) pode ajudar a detectar conteúdo e imagens prejudiciais por meio de uma solicitação de API.
113
+
Embora o trabalho de desenvolver soluções de IA Responsável possa parecer muito, porém é um trabalho que vale a pena. À medida que a área de IA Generativa cresce, mais ferramentas para ajudar os desenvolvedores a integrar eficientemente a responsabilidade em seus fluxos de trabalho amadurecerão. Por exemplo, o [Azure AI Content Safety](https://learn.microsoft.com/azure/ai-services/content-safety/overview?WT.mc_id=academic-105485-koreyst) pode ajudar a detectar conteúdo e imagens prejudiciais por meio de uma solicitação de API.
114
114
115
115
## Verificação de Conhecimento
116
116
@@ -128,7 +128,6 @@ Leia sobre o [Azure AI Content Safety](https://learn.microsoft.com/azure/ai-serv
128
128
129
129
## Ótimo Trabalho, Continue Sua Aprendizagem
130
130
131
-
Quer aprender mais sobre como construir com IA Generativa de forma responsável? Acesse a [página de aprendizado contínuo](../../../13-continued-learning/translations/pt-br/README.md?WT.mc_id=academic-105485-koreyst) para encontrar outros ótimos recursos sobre esse tópico.
131
+
Quer aprender mais sobre como construir com IA Generativa de forma responsável? Acesse a [página de aprendizado contínuo](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) para encontrar outros ótimos recursos sobre esse tópico.
132
132
133
133
Vamos agora para a Lição 4, onde exploraremos os [Fundamentos da Engenharia de Prompt](../../../04-prompt-engineering-fundamentals/translations/pt-br/README.md?WT.mc_id=academic-105485-koreyst)!
Copy file name to clipboardExpand all lines: 04-prompt-engineering-fundamentals/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -385,6 +385,6 @@ See if you can leverage the "cue" technique with the prompt: Complete the senten
385
385
386
386
## Great Work! Continue Your Learning
387
387
388
-
Want to learn more about different Prompt Engineering concepts? Go to the [continued learning page](../13-continued-learning/README.md?WT.mc_id=academic-105485-koreyst) to find other great resources on this topic.
388
+
Want to learn more about different Prompt Engineering concepts? Go to the [continued learning page](https://aka.ms/genai-collection?WT.mc_id=academic-105485-koreyst) to find other great resources on this topic.
389
389
390
390
Head over to Lesson 5 where we will look at [advanced prompting techniques](../05-advanced-prompts/README.md?WT.mc_id=academic-105485-koreyst)!
0 commit comments