google-gemini / google-gemini/gemini-cli
Ability to refer files within GCS bucket via Gemini CLI
- Dominant language
- TypeScript
- Stars
- 107k
- Forks
- 14.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 45
Description
### What would you like to be added?
Currently Gemini CLI can refer to files that are present in a given repository.
If for example, I would like Gemini CLI to refer to a GCS Cloud Bucket URI when relevant, for example, I will mention , : ' Read "gs://srini-npp-industry-docs/NPP.pdf" to understand more about NPP' as part of my GEMINI.md
### Why is this needed?
In Enterprise, many times, some files needs to be maintained centrally, and they may be changed at a specific frequency, and it is easier to refer via such means, than copying in the repository. Also performance of vertex api will be better when we have slightly bigger files in gcs instead of local.
### Additional context
We have various tools as part of "https://github.com/google-gemini/gemini-cli/tree/main/packages/core/src/tools" , we can add a new tool that adds a GCS URI within vertex AI api payload like below:
Sample curl command:
```
curl -s -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
"https://${LOCATION}-aiplatform.googleapis.com/v1/projects/${PROJECT_ID}/locations/${LOCATION}/publishers/google/models/${MODEL}:generateContent" \
-d "{
\"contents\": [{
\"role\": \"user\",
\"parts\": [
{
\"text\": \"${QUESTION}\"
},
{
\"fileData\": {
\"mimeType\": \"${MIME_TYPE}\",
\"fileUri\": \"${GCS_URI}\"
}
}
]
}]
}"
```
Contributor guide
Assessment
This issue has not been assessed yet.