https://github.com/perongh/gemini2oai
Convert Gemini API to OpenAI API
https://github.com/perongh/gemini2oai
Last synced: about 2 months ago
JSON representation
Convert Gemini API to OpenAI API
- Host: GitHub
- URL: https://github.com/perongh/gemini2oai
- Owner: PeronGH
- Created: 2024-07-07T02:30:52.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-07-08T05:04:41.000Z (10 months ago)
- Last Synced: 2025-01-19T09:42:17.945Z (4 months ago)
- Language: TypeScript
- Homepage: https://gemini-to-openai.deno.dev/
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gemini2OAI
Convert Gemini API to OpenAI API.
## Getting Started
### Self-Hosted
```sh
deno run -A main.ts
```Set `base_url` to `http://localhost:8000/v1` and use your API Key from Google AI
Studio.### Serverless
Set the `base_url` of OpenAI SDK to `https://gemini-to-openai.deno.dev/v1`.
Use the key from Google AI Studio as the `api_key`.
## Notes
### Model Mapping
- Gemini models -> Unchanged
- `gpt-4o` -> `gemini-1.5-pro`
- Other models -> `gemini-1.5-flash`