Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generative AI SDR Agent - Powered By GCP Vertex AI

Search personas, scrape social media presence, draft custom emails on specified topic

Alt Text

Tech Stack

Client: Streamlit

Server Side: LangChain 🦜🔗

LLM: PaLM 2

Runtime: Cloud Run

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

STREAMLIT_SERVER_PORT

Run Locally

Clone the project

  git clone https://github.com/emarco177/llm-agnets.git

Go to the project directory

  cd llm-agnets

Install dependencies

  pipenv install

Start the Streamlit server

  streamlit run app.py

NOTE: When running locally make sure GOOGLE_APPLICATION_CREDENTIALS is set to a service account with permissions to use VertexAI

Deployment to cloud run

CI/CD via Cloud build is available in cloudbuild.yaml

Please replace $PROJECT_ID with your actual Google Cloud project ID.

To deploy manually:

  1. Export PROJECT_ID environment variable:
export PROJECT_ID=$(gcloud config get-value project)
  1. Make sure you enable GCP APIs:
gcloud services enable cloudbuild.googleapis.com
gcloud services enable run.googleapis.com
gcloud services enable secretmanager.googleapis.com
gcloud services enable artifactregistry.googleapis.com
gcloud services enable aiplatform.googleapis.com

  1. Create a service account vertex-ai-consumer with the following roles:
gcloud iam service-accounts create vertex-ai-consumer \
    --display-name="Vertex AI Consumer"

gcloud projects add-iam-policy-binding $PROJECT_ID \
    --member="serviceAccount:vertex-ai-consumer@$PROJECT_ID.iam.gserviceaccount.com" \
    --role="roles/run.invoker"

gcloud projects add-iam-policy-binding $PROJECT_ID \
    --member="serviceAccount:vertex-ai-consumer@$PROJECT_ID.iam.gserviceaccount.com" \
    --role="roles/serviceusage.serviceUsageConsumer"

gcloud projects add-iam-policy-binding $PROJECT_ID \
    --member="serviceAccount:vertex-ai-consumer@$PROJECT_ID.iam.gserviceaccount.com" \
    --role="roles/ml.admin"

gcloud projects add-iam-policy-binding $PROJECT_ID \
    --member="serviceAccount:vertex-ai-consumer@$PROJECT_ID.iam.gserviceaccount.com" \
    --role="roles/aiplatform.admin"
  1. Build Image
docker build . -t us-east1-docker.pkg.dev/$PROJECT_ID/app/palm2-app:latest
  1. Push to Artifact Registry
docker push us-east1-docker.pkg.dev/$PROJECT_ID/app/palm2-app:latest
  1. Deploy to cloud run
    --image=us-east1-docker.pkg.dev/PROJECT_ID/app/palm2-app:latest \
    --region=us-east1 \
    --service-account=vertex-ai-consumer@$PROJECT_ID.iam.gserviceaccount.com \
    --allow-unauthenticated \
    --set-env-vars="STREAMLIT_SERVER_PORT=8080 \

🚀 About Me

Eden Marco, Customer Engineer @ Google Cloud, Tel Aviv🇮🇱

linkedin

twitter

About

No description, website, or topics provided.

Resources

Stars

15 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages