Skip to content

Commit

Permalink
Merge pull request #74 from Deeptechia/main
Browse files Browse the repository at this point in the history
Changes from main
  • Loading branch information
kelyacf authored Aug 22, 2024
2 parents f05f853 + e436b10 commit 2b8ac59
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 8 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy
on:
push:
branches:
- main
- staging

jobs:
ssh-command:
Expand Down
93 changes: 93 additions & 0 deletions .github/workflows/google.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# This workflow will build a docker container, publish it to Google Container Registry, and deploy it to GKE when there is a push to the "main" branch.
#
# To configure this workflow:
#
# 1. Ensure that your repository contains the necessary configuration for your Google Kubernetes Engine cluster, including deployment.yml, kustomization.yml, service.yml, etc.
#
# 2. Create and configure a Workload Identity Provider for GitHub (https://github.com/google-github-actions/auth#setting-up-workload-identity-federation)
#
# 3. Change the values for the GAR_LOCATION, GKE_ZONE, GKE_CLUSTER, IMAGE, REPOSITORY and DEPLOYMENT_NAME environment variables (below).
#
# For more support on how to run the workflow, please visit https://github.com/google-github-actions/setup-gcloud/tree/master/example-workflows/gke-kustomize

name: Build and Deploy to GKE

on:
push:
branches: [ "staging" ]

env:
PROJECT_ID: ${{ secrets.GKE_PROJECT }} # GKE_PROJECT creado en secrets del proyecto - Devops-Tools
GAR_LOCATION: us-central1 # Region del Artifactor
GKE_CLUSTER: autopilot-cluster-1 # Cree un nuevo cluster de Kubernetes
GKE_ZONE: us-central1 # Zona del cluster
DEPLOYMENT_NAME: gke-test # TODO: update to deployment name
REPOSITORY: docker-repository # Cree un nuevo repositorio donde se almacenara la imagen de Docker
IMAGE: geppetto

jobs:
setup-build-publish-deploy:
name: Setup, Build, Publish, and Deploy
runs-on: ubuntu-latest
environment: production

permissions:
contents: 'read'
id-token: 'write'

steps:
- name: Checkout
uses: actions/checkout@v3

# Configure Workload Identity Federation and generate an access token.
- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v0'
with:
token_format: 'access_token'
workload_identity_provider: 'projects/99059079106/locations/global/workloadIdentityPools/github/subject/SUBJECT_ATTRIBUTE_VALUE'
service_account: 'deploy-geppetto-from-github@geppetto-408614.iam.gserviceaccount.com'



# Alternative option - authentication via credentials json
# - id: 'auth'
# uses: 'google-github-actions/auth@v0'
# with:
# credentials_json: '${{ secrets.GCP_CREDENTIALS }}'

- name: Docker configuration
run: |-
docker login -u oauth2accesstoken -p ${{steps.auth.outputs.access_token}} https://$GAR_LOCATION-docker.pkg.dev
# Get the GKE credentials so we can deploy to the cluster
- name: Set up GKE credentials
uses: google-github-actions/get-gke-credentials@v0
with:
cluster_name: ${{ env.GKE_CLUSTER }}
location: ${{ env.GKE_ZONE }}

# Build the Docker image
- name: Build
run: |-
docker build \
--tag "$GAR_LOCATION-docker.pkg.dev/$PROJECT_ID/$REPOSITORY/$IMAGE:$GITHUB_SHA" \
--build-arg GITHUB_SHA="$GITHUB_SHA" \
--build-arg GITHUB_REF="$GITHUB_REF" \
.
# Push the Docker image to Google Artifact Registry
- name: Publish
run: |-
docker push "$GAR_LOCATION-docker.pkg.dev/$PROJECT_ID/$REPOSITORY/$IMAGE:$GITHUB_SHA"
# Set up kustomize
- name: Set up Kustomize
run: |-
curl -sfLo kustomize https://github.com/kubernetes-sigs/kustomize/releases/download/v3.1.0/kustomize_3.1.0_linux_amd64
chmod u+x ./kustomize
# Deploy the Docker image to the GKE cluster
- name: Deploy
run: |-
# replacing the image name in the k8s template
./kustomize edit set image LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY/IMAGE:TAG=$GAR_LOCATION-docker.pkg.dev/$PROJECT_ID/$REPOSITORY/$IMAGE:$GITHUB_SHA
./kustomize build . | kubectl apply -f -
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
## ⭐️ Key Features

- 🔀 **Multi-Model Support:** Toggle effortlessly between AI models like ChatGPT, Claude and Gemini to suit your specific requirements. ChatGPT model gpt4-turbo is set as the default model.
- 🔑 **Access for All:** Provide access for everyone in slack without requiring any additional payment or configuration per user.
- 💬 **Streamlined Communication:** Initiate dynamic conversation threads by directly messaging Geppetto.
- ➡️ **Advanced LLM Control:** Manage multiple AI models with the advanced LLM controller component.
- 🔧 **Effortless Setup:** Enjoy a smooth setup experience powered by Docker 🐳.
Expand Down Expand Up @@ -103,7 +104,7 @@ With Docker and Docker Compose ready:

- Rename `docker-compose.example.yml` to `docker-compose.yml` and update your config folder location.
- Adjust configuration values in `config/.env`.
- Execute `docker compose` build followed by `docker compose up -d`.
- Execute `docker compose build` followed by `docker compose up -d`.

## 🧪 Testing

Expand Down
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.masonry.api"

[tool.poetry]
name = "geppetto"
version = "0.2.1"
version = "0.2.5"
authors = [
"Lucas Arbues <[email protected]>",
"Ignacio Peña <[email protected]>",
Expand All @@ -17,7 +17,7 @@ authors = [
"Carlos Sims <[email protected]>",
"Camila Gallo Garcia <[email protected]>"
]
description = "Geppetto is a sophisticated Slack bot that facilitates seamless interaction with multiple AI models, including OpenAI's ChatGPT-4, DALL-E-3, and Google's Gemini model."
description = "Geppetto is a sophisticated Slack bot that facilitates seamless interaction with multiple AI models, including OpenAI's ChatGPT, DALL-E, Claude and Google's Gemini model."
readme = "README.md"
classifiers = [
"Development Status :: 3 - Alpha",
Expand All @@ -29,16 +29,16 @@ classifiers = [

[tool.poetry.dependencies]
python = "^3.9"
certifi = "^2023.11.17"
certifi = "^2024.2.2"
openai = "^1.4.0"
python-dotenv = "^1.0.0"
slack-bolt = "^1.18.1"
slack-sdk = "^3.26.1"
Pillow = "^10.1.0"
google-generativeai = "^0.5.0"
google-generativeai = "^0.7.2"
IPython = "^8.0.0"
unittest-xml-reporting = "^3.2.0"
anthropic = "^0.32.0"
anthropic = "^0.34.0"

[tool.poetry.scripts]
geppetto = "geppetto.main:main"
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
certifi>=2023.11.17
openai>=1.4.0
python-dotenv==1.0.0
python-dotenv==1.0.1
slack-bolt>=1.18.1
slack-sdk>=3.26.1
pillow>=10.1.0
Expand Down

0 comments on commit 2b8ac59

Please sign in to comment.