Skip to content

Commit 290f052

Browse files
authored
Merge pull request #4 from haroonc/main
Added local RAG
2 parents adc2b04 + c69749f commit 290f052

15 files changed

Lines changed: 410 additions & 130 deletions

File tree

‎.github/workflows/nightly-release.yml‎

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ jobs:
2424
steps:
2525
- uses: actions/checkout@v3
2626

27+
- name: prep-release
28+
run: |
29+
mkdir -p release
30+
cp ../gemini-extension.json release/
31+
cp ../README.md release/
32+
cp ../local-rag/devops-rag.db release/
33+
2734
- name: Set up Go
2835
uses: actions/setup-go@v3
2936
with:
@@ -38,17 +45,17 @@ jobs:
3845
- name: Run Go Tests
3946
run: go test ./...
4047

41-
- name: Install golangci-lint
42-
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
48+
# - name: Install golangci-lint
49+
# run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
4350

44-
- name: Run golangci-lint
45-
run: golangci-lint run
51+
# - name: Run golangci-lint
52+
# run: golangci-lint run
4653

4754
- name: Build
4855
run: |
4956
export GOOS=${{ matrix.goos }}
5057
export GOARCH=${{ matrix.goarch }}
51-
go build -o "release/devops-mcp-server-${{ matrix.goos }}-${{ matrix.goarch }}" ./devops-mcp-server
58+
go build -o "release/devops-mcp-server-${GOOS}-${GOARCH}"
5259
5360
- name: Create release assets
5461
run: |

‎.github/workflows/release.yml‎

Lines changed: 0 additions & 37 deletions
This file was deleted.

‎.gitignore‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
**/*.pyc
55
**/.DS_Store
66
.vscode/
7-
*.code-workspace
7+
*.code-workspace
8+
.rag-sources

‎devops-mcp-server/server_test.go‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2024 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
package main
216

317
import (

‎local-rag/README.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Local RAG
2+
3+
This module is used to build a local RAG database using [chromem-go](https://pkg.go.dev/github.com/clocklear/chromem-go#section-readme) in-memory vector store.
4+
5+
## Pre-requisites
6+
7+
- Google Cloud project with billing enabled.
8+
- Google Cloud project with VertexAI APIs enabled.
9+
- Application Default Credentials (ADC) for a Google Cloud account. With default project, or a quota-project enabled. e.g., via
10+
```
11+
gcloud auth application-default login
12+
gcloud auth application-default set-quota-project PROJECT_ID
13+
```

‎local-rag/devops-rag.db‎

36.1 MB
Binary file not shown.

‎local-rag/go.mod‎

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,50 @@
1-
module github.com/haroonc/cicd-agent/vertex-rag
1+
module local-rag
22

33
go 1.24.4
44

55
require (
6+
cloud.google.com/go/auth v0.17.0
67
github.com/JohannesKaufmann/html-to-markdown v1.6.0
78
github.com/PuerkitoBio/goquery v1.10.3
89
github.com/go-git/go-git/v5 v5.12.0
910
github.com/philippgille/chromem-go v0.7.0
10-
golang.org/x/oauth2 v0.32.0
11+
github.com/tmc/langchaingo v0.1.13
1112
)
1213

1314
require (
14-
cloud.google.com/go/compute/metadata v0.3.0 // indirect
15+
cloud.google.com/go/compute/metadata v0.8.0 // indirect
1516
dario.cat/mergo v1.0.0 // indirect
1617
github.com/Microsoft/go-winio v0.6.1 // indirect
1718
github.com/ProtonMail/go-crypto v1.0.0 // indirect
1819
github.com/andybalholm/cascadia v1.3.3 // indirect
1920
github.com/cloudflare/circl v1.3.7 // indirect
2021
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
22+
github.com/dlclark/regexp2 v1.10.0 // indirect
2123
github.com/emirpasic/gods v1.18.1 // indirect
2224
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
2325
github.com/go-git/go-billy/v5 v5.5.0 // indirect
2426
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
27+
github.com/google/uuid v1.6.0 // indirect
28+
github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
29+
github.com/googleapis/gax-go/v2 v2.15.0 // indirect
2530
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
2631
github.com/kevinburke/ssh_config v1.2.0 // indirect
2732
github.com/pjbgf/sha1cd v0.3.0 // indirect
33+
github.com/pkoukk/tiktoken-go v0.1.6 // indirect
2834
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
2935
github.com/skeema/knownhosts v1.2.2 // indirect
3036
github.com/xanzy/ssh-agent v0.3.3 // indirect
31-
golang.org/x/crypto v0.37.0 // indirect
32-
golang.org/x/mod v0.17.0 // indirect
33-
golang.org/x/net v0.39.0 // indirect
34-
golang.org/x/sync v0.10.0 // indirect
35-
golang.org/x/sys v0.32.0 // indirect
36-
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
37+
gitlab.com/golang-commonmark/html v0.0.0-20191124015941-a22733972181 // indirect
38+
gitlab.com/golang-commonmark/linkify v0.0.0-20191026162114-a0c2df6c8f82 // indirect
39+
gitlab.com/golang-commonmark/markdown v0.0.0-20211110145824-bf3e522c626a // indirect
40+
gitlab.com/golang-commonmark/mdurl v0.0.0-20191124015652-932350d1cb84 // indirect
41+
gitlab.com/golang-commonmark/puny v0.0.0-20191124015043-9f83538fa04f // indirect
42+
golang.org/x/crypto v0.41.0 // indirect
43+
golang.org/x/mod v0.26.0 // indirect
44+
golang.org/x/net v0.43.0 // indirect
45+
golang.org/x/sync v0.16.0 // indirect
46+
golang.org/x/sys v0.35.0 // indirect
47+
golang.org/x/text v0.28.0 // indirect
48+
golang.org/x/tools v0.35.0 // indirect
3749
gopkg.in/warnings.v0 v0.1.2 // indirect
3850
)

0 commit comments

Comments
 (0)