Deploying the GCP Cloud Run Funciton:
gcloud functions deploy thomasvn-chat \
--gen2 \
--runtime=go122 \
--region=us-west1 \
--source=. \
--entry-point=Chat \
--trigger-http \
--allow-unauthenticated \
--memory=128Mi \
--cpu=.083 \
--env-vars-file=.env.yaml
gcloud functions describe thomasvn-chat --region=us-west1
gcloud functions delete thomasvn-chat --region=us-west1
Local Testing:
export OPENAI_API_KEY=""
export OPENAI_MODEL="gpt-4o-mini"
go run pkg/cmd/main.go "What has Thomas written about regarding Formula1?"
- OpenAI Models (GPT-4o mini recommended)
- LangChain
- Google Cloud Run Function v2