This repository proposes a first implementation of Google Cloud Palm API to generate text in Go. The client does not support chat and embedding but it's a base for something bigger.
This article presents that the concept and the different important code part
- Use Google Cloud OAuth client for authentication
- Generate Palm API url based on parameters (projectID, region and model name)
- Authenticate yourself to Google Cloud
gcloud auth application-default login
- Change the
projectId
in themain.go
file - Run the code with
go run .
Reuse and customize the code as you wish!
This library is licensed under Apache 2.0. Full license text is available in LICENSE.