-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8fad9c6
commit c39f50b
Showing
13 changed files
with
740 additions
and
429 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file added
BIN
+3.22 MB
public/assets/posts/local-code-ai-assistant/lamma-auto-complete-code.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
--- | ||
|
||
<div class="giscus"></div> | ||
|
||
<script | ||
is:inline | ||
src="https://giscus.app/client.js" | ||
data-repo="leoferreiralima/leoferreira.dev" | ||
data-repo-id="R_kgDOHWVklA" | ||
data-category="Announcements" | ||
data-category-id="DIC_kwDOHWVklM4CfTAM" | ||
data-mapping="pathname" | ||
data-strict="1" | ||
data-reactions-enabled="1" | ||
data-emit-metadata="0" | ||
data-input-position="top" | ||
data-theme="dark" | ||
data-lang="pt" | ||
data-loading="lazy" | ||
crossorigin="anonymous" | ||
async></script> |
80 changes: 80 additions & 0 deletions
80
src/content/blog/configurando-um-assistente-ia-local-para-programacao.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
--- | ||
title: Configurando um assistente IA local para programação | ||
excerpt: In recent years, the way we work has undergone a significant transformation, largely due to advancements in technology and changing attitudes toward work-life balance. One of the most notable changes has been the rise of remote work, allowing employees to work from the comfort of their own homes. | ||
publishDate: '2024-06-21 12:00:00' | ||
isFeatured: true | ||
tags: | ||
- IA | ||
- Assitente IA | ||
- Inteligência Artificial | ||
- Programação | ||
- VsCode | ||
- Ollama | ||
image: | ||
src: '../../assets/posts/local-code-ai-assistant/hero.png' | ||
alt: Ollama + VsCode | ||
--- | ||
|
||
Não é novidade que a Inteligência Artificial está em alta, trazendo consigo uma série de ferramentas para facilitar o dia a dia em diversas áreas. | ||
No mundo da programação, uma das grandes inovações é o GitHub Copilot, desenvolvido com a ajuda da OpenAI. | ||
|
||
No entanto, o Copilot é uma ferramenta paga e não oferece garantias sólidas de privacidade dos seus dados. | ||
|
||
Felizmente, existem alternativas gratuitas que proporcionam resultados semelhantes. | ||
Uma excelente combinação é o Ollama, junto com a extensão Continue para o Visual Studio Code (VSCode). | ||
|
||
Siga o passo a passo abaixo para instalar e configurar o Ollama e a extensão Continue no VSCode: | ||
|
||
## 1. Instalação do Ollama | ||
|
||
Ollama é uma ferramenta open source para executar LLMs localmente no seu computador. | ||
É possível rodar modelos como: Llama 3, Phi 3, Mistral, Gemma, etc. | ||
Para ver a listagem completa acesso a página de [modelos](https://www.ollama.com/library) | ||
|
||
Para instalar Ollama, siga as instruções no site oficial: https://www.ollama.com | ||
|
||
## 2. Instalação da extensão Continue | ||
|
||
Após a instalação do Ollama, é necessário configurar a extensão Continue na IDE. | ||
|
||
Na aba de extensões do VsCode, procure por [**Continue**](https://marketplace.visualstudio.com/items?itemName=Continue.continue) e clique em **Instalar**. | ||
|
||
 | ||
|
||
Ao instalar a extensão, sera necessário rodar os modelos do ollama. Isso pode ser feito no próprio VsCode na aba do Continue. | ||
|
||
1. Selecione a aba **Continue** e clique em **Local Models**. | ||
|
||
2. Rode os modelos do Ollama. Neste caso usaremos o Llamma3 para chat e o starcoder2 para gerar código. | ||
|
||
3. Após a execução dos modelos, você está pronto para usar o Continue. | ||
|
||
**Obeservação:** Também é possivel usar outros modelos, para mais informações acesse a documentação oficial do [Continue](https://docs.continue.dev/setup/configuration) | ||
|
||
## 3. Começe a usar! | ||
|
||
Depois de tudo configurado é só usar. Além de te ajudar a escrever, gerar e explicar código, | ||
o Continue também consegue aprender com o seu codebase para dar sugestões mais precisas. | ||
|
||
Abaixo está listado alguns exemplos de uso junto com uma demostração. | ||
|
||
### Conversando via Chat | ||
|
||
Assim como o ChatGPT, podemos usar o Chat para conversar com o assistente IA. | ||
|
||
 | ||
|
||
### Geração de código com um simples prompt | ||
|
||
Além de fazer perguntas, o assistente IA também pode gerar código para você. | ||
|
||
 | ||
|
||
### Escreva código com ajuda do auto complete e economize tempo | ||
|
||
E claro, o assistente IA também pode ajudar a escrever ou te explicar o código. | ||
|
||
 | ||
|
||
Não deixe de conferir a documentação e blog oficial do [Ollama](https://www.ollama.com/blog/continue-code-assistant) e do [Continue](https://www.continue.dev/) | ||
para saber mais sobre como usar o assistente IA em diferentes aplicativos e linguagens de programação. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
{ | ||
"extends": "astro/tsconfigs/strict", | ||
"compilerOptions": { | ||
"strictNullChecks": true | ||
"strictNullChecks": true, | ||
"baseUrl": ".", | ||
"paths": { | ||
"@/*": [ | ||
"./src/*" | ||
] | ||
} | ||
} | ||
} |