본문 바로가기

명사 美 비격식 (무리 중에서) 아주 뛰어난[눈에 띄는] 사람[것]

Personal/Tip

Continue, GPT, Claude, Gemini 여러 LLM 사용하기 (feat.ollama모델 연결하기)

 

continue

https://docs.continue.dev/

 

Continue - Docs

The continuedev/continue repository is no longer actively maintained and is read-only for all users. To learn how Continue works and how to configure and customize it, explore the rest of the Continue Docs. We polished Continue and shipped a final 2.0.0 re

docs.continue.dev

 

 

 

vscode에서 extension - continue - 설치

 

 

 

 

 

 

오른쪽 아래 바 - continue 클릭 - open chat

 

 

 

api툴 조회하기.

 

 

 

openai gpt

 

https://platform.openai.com/api-keys

 

OpenAI Platform

 

platform.openai.com

 

 

 

 

 

claude

결제수단을 등록하면 api key를 얻을 수있다 .

https://platform.claude.com/docs/en/api/admin/api_keys/retrieve

 

Get API Key - Claude API Reference

Get API Key

platform.claude.com

 

 

 

 

 

gemini

 

 

https://aistudio.google.com/api-keys?hl=ko

 

로그인 - Google 계정

이메일 또는 휴대전화

accounts.google.com

 

 

 

 

 

이후 continue 로고를 클릭해 사용하면 되나, 원하는 모델을 추가해 API키 입력해서 연결해 쓸 수 있다 .

 

 

 

 

config 파일로도 설정할 수 있다. 

continue열기 - 설정 - configs - main config 설정

 

 

 

 

 

 

API키가 필요없는 ollama를 추가해보자. 

우선 ollama 설치 및 모델 다운한뒤에 진행하라.

https://standout.tistory.com/1868

 

ollama: 로컬 환경에서 대규모 언어 모델(LLM)을 쉽게 실행할 수 있게 해주는 오픈소스 도구

ollama로컬 환경에서 대규모 언어 모델(LLM)을 쉽게 실행할 수 있게 해주는 오픈소스 도구Ollama는 로컬에서 LLM 모델이 실행되기 때문에 데이터가 서버로 전송되지 않으며 데이터가 유출될 일이 없

standout.tistory.com

 

 

 

 

해당 코드는 continue사용가능한 looama 모델을 자동감지를 사용하는 것으로 docs.continue에서 발췌했다. 

  - name: Autodetect
    provider: ollama
    model: AUTODETECT
    roles:
      - chat
      - edit
      - apply
      - rerank
      - autocomplete

https://docs.continue.dev/guides/ollama-guide

 

Using Ollama with Continue: A Developer's Guide | Continue - Docs

The Autodetect feature scans your local Ollama installation and lists all available models. When set to AUTODETECT, Continue will dynamically populate the model list based on what's installed locally via ollama list. This is useful for quickly switching be

docs.continue.dev

 

 

 

저장 , yaml이 로딩된 뒤 모델이 뜬다.  - 선택 

 

 

 

사용.

 

 

 

 

 

 

실제 코드를 수정시켜봤을때 작동은 하지만 느리고, 사실 아직 잘 작동하는 편은 아니다. 

하지만 로컬에 위치해 인터넷없이 돌아가는 LLM을 테스트해봤다는것과, 아주 간단하고 복잡상세한 프롬프트로 도움을 받을 수있다는 것을 생각하면 좋을 것이라 판단된다. 

빨리 더 발전하길바라며, 개발자가 토큰에서 벗어나는 그날이 오길 바란다.