Skip to content

Commit 3958094

Browse files
authored
docs(CODESPACES.md): add gemini
1 parent 85e3c11 commit 3958094

File tree

1 file changed

+84
-2
lines changed

1 file changed

+84
-2
lines changed

‎CODESPACES.md‎

Lines changed: 84 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# GitHub Codespaces support
1+
# Use Case: GitHub Codespaces
22

33
**Backstory**
44

@@ -81,10 +81,92 @@ Type the following to manually run:
8181
>
8282
> Exception: Error from OpenAI Gateway (401
8383
84-
**References**
84+
12. Alternatively, use Google Gemini instead of OpenAI
85+
86+
**Preqrequisites:**
87+
88+
```bash
89+
python -m venv venv
90+
```
91+
92+
```bash
93+
source ./venv/bin/activate
94+
```
95+
96+
```bash
97+
pip install -e .
98+
```
99+
100+
**Use gemini-openai-proxy and Gemini:**
101+
102+
http://localhost:8080 is gemini-openai-proxy
103+
104+
gpt-4 maps to gemini-1.5-flash-latest
105+
106+
Hence use gpt-4 below in `--llm.model=gpt-4`
107+
108+
Gemini free tier has a limit of 15 requests per minute, and 1500 requests per day
109+
110+
Hence `--max_turns 999999999` will exceed the daily limit
111+
112+
```bash
113+
docker run --restart=unless-stopped -it -d -p 8080:8080 --name gemini zhu327/gemini-openai-proxy:latest
114+
```
115+
116+
export GEMINI_API_KEY=
117+
118+
```bash
119+
wintermute LinuxPrivesc --llm.api_key=$GEMINI_API_KEY --llm.model=gpt-4 --llm.context_size=1000000 --conn.host=192.168.122.151 --conn.username=lowpriv --conn.password=trustno1 --conn.hostname=test1 --llm.api_url=http://localhost:8080 --llm.api_backoff=60 --max_turns 999999999
120+
```
121+
122+
123+
**Google AI Studio: Gemini free tier has a limit of 15 requests per minute, and 1500 requests per day:**
124+
125+
https://ai.google.dev/pricing#1_5flash
126+
127+
> Gemini 1.5 Flash
128+
>
129+
> The Gemini API “free tier” is offered through the API service with lower rate limits for testing purposes. Google AI Studio usage is completely free in all available countries.
130+
>
131+
> Rate Limits
132+
>
133+
> 15 RPM (requests per minute)
134+
>
135+
> 1 million TPM (tokens per minute)
136+
>
137+
> 1,500 RPD (requests per day)
138+
>
139+
> Used to improve Google's products
140+
>
141+
> Yes
142+
143+
https://ai.google.dev/gemini-api/terms#data-use-unpaid
144+
145+
> How Google Uses Your Data
146+
>
147+
> When you use Unpaid Services, including, for example, Google AI Studio and the unpaid quota on Gemini API, Google uses the content you submit to the Services and any generated responses to provide, improve, and develop Google products and services and machine learning technologies, including Google's enterprise features, products, and services, consistent with our Privacy Policy https://policies.google.com/privacy
148+
>
149+
> To help with quality and improve our products, human reviewers may read, annotate, and process your API input and output. Google takes steps to protect your privacy as part of this process. This includes disconnecting this data from your Google Account, API key, and Cloud project before reviewers see or annotate it. **Do not submit sensitive, confidential, or personal information to the Unpaid Services.**
150+
151+
**README.md and Disclaimers:**
152+
153+
https://github.com/ipa-lab/hackingBuddyGPT/blob/main/README.md
154+
155+
**Please refer to [README.md](https://github.com/ipa-lab/hackingBuddyGPT/blob/main/README.md) for all disclaimers.**
156+
157+
Please note and accept all of them.
158+
159+
**References:**
85160
* https://docs.github.com/en/codespaces
86161
* https://docs.github.com/en/codespaces/getting-started/quickstart
87162
* https://docs.github.com/en/codespaces/reference/using-the-vs-code-command-palette-in-codespaces
88163
* https://openai.com/api/pricing/
89164
* https://platform.openai.com/docs/quickstart
90165
* https://platform.openai.com/api-keys
166+
* https://ai.google.dev/gemini-api/docs/ai-studio-quickstart
167+
* https://aistudio.google.com/
168+
* https://aistudio.google.com/app/apikey
169+
* https://ai.google.dev/
170+
* https://ai.google.dev/gemini-api/docs/api-key
171+
* https://github.com/zhu327/gemini-openai-proxy
172+
* https://hub.docker.com/r/zhu327/gemini-openai-proxy

0 commit comments

Comments
 (0)