-
Compile
go build .
-
Edit
config.json
to fill the gemini APIKey from https://makersuite.google.com/app/apikey. -
Start the server
./hcfy-gemini
-
Fill
http://localhost:7458/api/hcfy
to the hcfy setting.
-
Create a new Vercel project by importing this repo.
- Set "Framework Preset" to
Other
. - Set "Root Directory" to
vercel
. - Add environment variables:
GEMINI_API_KEY
: your gemini APIKey.PASSWORD
: an arbitrary string that used to protect your Vercel API endpoint.
- Set "Framework Preset" to
-
Fill
https://<your project name>.vercel.app/api/hcfy?pass=<your password>
to the hcfy setting.
-
Build image.
docker build -t hcfy-gemini:latest .
-
Run.
docker run -d \ --name hcfy-gemini \ -e GEMINI_API_KEY="<your gemini APIKey>" \ -e MODEL_NAME="gemini-1.5-flash-latest" \ -e PASSWORD="<arbitrary string>" \ -p 7458:7458 \ --restart unless-stopped \ hcfy-gemini:latest
-
Fill
http://<server hostname>:7458/api/hcfy?pass=<PASSWORD>
to the hcfy setting.
-
The
APIKEY
andmodel
fields will not be used byhcfy-gemini
, so you can fill in any values for them. -
You can increase the value of
Maximum Requests Per Second
appropriately. -
Fill
http://<server host>:<port>/api/cjsfy
to theCustom API Endpoint
field. -
For the
Prompt
, fill in the following:{{to}} -----splitter----- {{text}}