Skip to content

Commit

Permalink
ragserver: add ragserver-genkit variant
Browse files Browse the repository at this point in the history
Change-Id: I9e34c00ea00a01190e898c4de236061da1e1f55e
Reviewed-on: https://go-review.googlesource.com/c/example/+/608737
Auto-Submit: Eli Bendersky <[email protected]>
TryBot-Bypass: Eli Bendersky <[email protected]>
Reviewed-by: Jonathan Amsterdam <[email protected]>
Reviewed-by: Eli Bendersky <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
  • Loading branch information
eliben authored and gopherbot committed Aug 30, 2024
1 parent 131af90 commit 88ba6f5
Show file tree
Hide file tree
Showing 6 changed files with 646 additions and 2 deletions.
4 changes: 3 additions & 1 deletion ragserver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Weaviate has the be installed locally; the easiest way to do so is by using
/add/: POST {"documents": [{"text": "..."}, {"text": "..."}, ...]}
response: OK (no body)
/query/: GET {"content": "..."}
/query/: POST {"content": "..."}
response: model response as a string
```

Expand All @@ -33,6 +33,8 @@ Weaviate has the be installed locally; the easiest way to do so is by using
and the Weaviate Go client library directly for interacting with Weaviate.
* `ragserver-langchaingo`: uses [LangChain for Go](https://github.com/tmc/langchaingo)
to interact with Weaviate and Google's LLM and embedding models.
* `ragserver-genkit`: uses [Genkit Go](https://firebase.google.com/docs/genkit-go/get-started-go)
to interact with Weaviate and Google's LLM and embedding models.

## Usage

Expand Down
72 changes: 72 additions & 0 deletions ragserver/ragserver-genkit/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
module golang.org/x/example/ragserver/ragserver-genkit

go 1.23.0

require github.com/firebase/genkit/go v0.1.1

require (
cloud.google.com/go v0.115.0 // indirect
cloud.google.com/go/ai v0.8.1-0.20240711230438-265963bd5b91 // indirect
cloud.google.com/go/auth v0.7.0 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect
cloud.google.com/go/compute/metadata v0.4.0 // indirect
cloud.google.com/go/longrunning v0.5.9 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/bahlo/generic-list-go v0.2.0 // indirect
github.com/buger/jsonparser v1.1.1 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/analysis v0.21.2 // indirect
github.com/go-openapi/errors v0.22.0 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.19.6 // indirect
github.com/go-openapi/loads v0.21.1 // indirect
github.com/go-openapi/spec v0.20.4 // indirect
github.com/go-openapi/strfmt v0.23.0 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-openapi/validate v0.21.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/generative-ai-go v0.16.1-0.20240711222609-09946422abc6 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.5 // indirect
github.com/invopop/jsonschema v0.12.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/weaviate/weaviate v1.26.0-rc.1 // indirect
github.com/weaviate/weaviate-go-client/v4 v4.15.0 // indirect
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
go.mongodb.org/mongo-driver v1.14.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 // indirect
go.opentelemetry.io/otel v1.26.0 // indirect
go.opentelemetry.io/otel/metric v1.26.0 // indirect
go.opentelemetry.io/otel/sdk v1.26.0 // indirect
go.opentelemetry.io/otel/trace v1.26.0 // indirect
golang.org/x/crypto v0.25.0 // indirect
golang.org/x/exp v0.0.0-20240318143956-a85f2c67cd81 // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/api v0.188.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240708141625-4ad9e859172b // indirect
google.golang.org/grpc v1.65.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 88ba6f5

Please sign in to comment.