Configure System to use LLMs
Common softwares
- git
- python
- uv
- VScode
- VSCode extensions (python and jupyter from microsoft)
- GCP SDK (GCP CLI)
-
AWS CLI
-
Prompt
I want to install the following sofwares on windows 11, give me a command line approach to install them
* git
* python
* uv
* VScode
* GCP SDK (GCP CLI)
* AWS CLI
* Azure CLI
- Winget
winget install --id Git.Git -e --source winget
winget install -e --id Python.Python.3.13
winget install -e --id astral-sh.uv
winget install --id Microsoft.VisualStudioCode -e --source winget
winget install --id Google.CloudSDK -e --source winget
winget install --id Amazon.AWSCLI -e --source winget
winget install Microsoft.AzureCLI
- Verify
git --version
python --version
uv --version
gcloud --version
aws --version
az --version
- cheaper models
- GCP: gemini-flash-lite
- AWS: Amazon Nova Micro
- Azure: Phi-4-mini
GCP
- Prompt for enabling vertex
Give me steps to enable Vertex AI on my GCP account using console
- Prompt for configuring access to vertex on your laptop
Give me steps to configure accessing vertex from langchain using langchain-google-genai
* GCloud sdk is installed, needs to be configured
* Give me steps to create a folder using uv give me steps to add necessary packages and using `flash-lite` model to ask what is capital of france to model
- Steps
gcloud auth login
gcloud config set project <YOUR_PROJECT_ID>
gcloud auth application-default login
- COnfigure sample code
mkdir vertex-langchain-demo
cd vertex-langchain-demo
uv init
uv sync
uv add langchain langchain-google-genai python-dotenv
- Pyproject.toml
[project]
name = "gcp-vertex-test"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
"google-cloud-aiplatform>=1.143.0",
"langchain>=1.2.13",
"langchain-google-genai>=4.2.1",
"python-dotenv>=1.2.2",
]
- .env
GOOGLE_CLOUD_PROJECT='<your-project-id>'
- main.py
from langchain_google_genai import ChatGoogleGenerativeAI
from dotenv import load_dotenv
load_dotenv()
import os
project = os.getenv('GOOGLE_CLOUD_PROJECT')
def main():
# Initialize model
llm = ChatGoogleGenerativeAI(
model="gemini-2.5-flash-lite",
temperature=0,
vertexai=True,
project=project
)
# Ask a question
response = llm.invoke("What is the capital of France?")
print(response.content)
if __name__ == "__main__":
main()
- Run
uv run main.py=>The capital of France is **Paris**.
